aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJan Svoboda <jan_svoboda@apple.com>2021-02-26 12:54:42 +0100
committerJan Svoboda <jan_svoboda@apple.com>2021-02-26 13:14:23 +0100
commit8dc70bdcd0fe4efb65876dce0144d9c3386a2f07 (patch)
treeb8ec113f87d5ed4eb3df52f4d920734735dcd5c1 /clang/lib/Frontend/CompilerInvocation.cpp
parent406ef36b03f911014018ba7ee1d3259567b14575 (diff)
downloadllvm-8dc70bdcd0fe4efb65876dce0144d9c3386a2f07.zip
llvm-8dc70bdcd0fe4efb65876dce0144d9c3386a2f07.tar.gz
llvm-8dc70bdcd0fe4efb65876dce0144d9c3386a2f07.tar.bz2
[clang][cli] Fix build failure in CompilerInvocation
There is a report that https://reviews.llvm.org/D96280 causes a build failure with error: too few template arguments for class template 'SmallVector'. This patch attempts to fix that by explicitly specifying N for SmallVector<T, N>.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 4d4b942..dac6418 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -663,7 +663,7 @@ static bool RoundTrip(ParseFn Parse, GenerateFn Generate,
// Generate arguments from the dummy invocation. If Generate is the
// inverse of Parse, the newly generated arguments must have the same
// semantics as the original.
- SmallVector<const char *> GeneratedArgs1;
+ SmallVector<const char *, 16> GeneratedArgs1;
Generate(DummyInvocation, GeneratedArgs1, SA);
// Run the second parse, now on the generated arguments, and with the real
@@ -683,7 +683,7 @@ static bool RoundTrip(ParseFn Parse, GenerateFn Generate,
// Generate arguments again, this time from the options we will end up using
// for the rest of the compilation.
- SmallVector<const char *> GeneratedArgs2;
+ SmallVector<const char *, 16> GeneratedArgs2;
Generate(RealInvocation, GeneratedArgs2, SA);
// Compares two lists of generated arguments.