diff options
author | xling-Liao <Xiangling.Liao@ibm.com> | 2021-03-12 15:19:43 -0600 |
---|---|---|
committer | xling-Liao <Xiangling.Liao@ibm.com> | 2021-03-12 21:41:36 -0600 |
commit | 0bf2da53c12b3d2bf213f667af74059280a0d661 (patch) | |
tree | d038eb64fa6110f01e4e097f513f98f71e829efa /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 70c921267e90d9c6d6b3980aca6e6fad0c0344f6 (diff) | |
download | llvm-0bf2da53c12b3d2bf213f667af74059280a0d661.zip llvm-0bf2da53c12b3d2bf213f667af74059280a0d661.tar.gz llvm-0bf2da53c12b3d2bf213f667af74059280a0d661.tar.bz2 |
[NFC] Adjust SmallVector.h header to workaround XL build compiler issue
In order to prevent further building issues related to the usage of SmallVector
in other compilation unit, this patch adjusts the llvm.h header as a workaround
instead.
Besides, this patch reverts previous workarounds:
1. Revert "[NFC] Use llvm::SmallVector to workaround XL compiler problem on AIX"
This reverts commit 561fb7f60ab631e712c3fb6bbeb47061222c6818.
2.Revert "[clang][cli] Fix build failure in CompilerInvocation"
This reverts commit 8dc70bdcd0fe4efb65876dce0144d9c3386a2f07.
Differential Revision: https://reviews.llvm.org/D98552
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 2606e9f..5ddd54c 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 *, 16> GeneratedArgs1; + SmallVector<const char *> 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 *, 16> GeneratedArgs2; + SmallVector<const char *> GeneratedArgs2; Generate(RealInvocation, GeneratedArgs2, SA); // Compares two lists of generated arguments. |