[PATCH] D96280: [clang][cli] Round-trip the whole CompilerInvocation

Shimin Cui via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 26 06:04:14 PST 2021


scui added inline comments.


================
Comment at: clang/lib/Frontend/CompilerInvocation.cpp:666
+  // semantics as the original.
+  SmallVector<const char *> GeneratedArgs1;
+  Generate(DummyInvocation, GeneratedArgs1, SA);
----------------
jansvoboda11 wrote:
> scui wrote:
> > This is failing our build, This line and line 686. The msg is:
> > 
> > llvm-project/clang/lib/Frontend/CompilerInvocation.cpp:666:3: error: too few template arguments for class template 'SmallVector'
> >   SmallVector<const char *> GeneratedArgs1;
> >   ^
> > llvm-project/clang/include/clang/Basic/LLVM.h:35:42: note: template is declared here
> >   template<typename T, unsigned N> class SmallVector;
> >   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> > llvm-project/clang/lib/Frontend/CompilerInvocation.cpp:686:3: error: too few template arguments for class template 'SmallVector'
> >   SmallVector<const char *> GeneratedArgs2;
> >   ^
> > llvm-project/clang/include/clang/Basic/LLVM.h:35:42: note: template is declared here
> >   template<typename T, unsigned N> class SmallVector;
> >   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~       ^
> > 2 errors generated.
> > 
> That's interesting, the definition of `SmallVector` defaults `N` to a sensible number. Out of interest: what compiler are you using?
> 
> Should be fixed in 8dc70bdcd0fe4efb65876dce0144d9c3386a2f07.
Thanks for the quick fix. We are using the IBM XL compilers.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96280/new/

https://reviews.llvm.org/D96280



More information about the cfe-commits mailing list