Fix upgrader codegen when constant list is 0 (#72199)
Summary:
When the constant list is empty, previous codegen will generate something like
```
std::vector<c10::IValue>({
}), // constants list,
```
However it will fail quick-check, because it includes trailing spaces. This pr will generate the following instead.
```
std::vector<c10::IValue>(), // constants list,
```
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72199
ghstack-source-id: 148231023
Test Plan: CI
Reviewed By: tugsbayasgalan
Differential Revision: D33952046
fbshipit-source-id: 359b8a418928c89bbeb446b44774b312c94f03bc
(cherry picked from commit 060490f66724e418a43548c2eaffa3244e780557)