Xiangling_L updated this revision to Diff 330415.
Xiangling_L added a comment.
Bring back two forward declarations to avoid changing pervasive `SmallVector`
to `llvm::SmallVector`
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98552/new/
https://reviews.llvm.org/D98552
Files:
clang/include/clang/Basic/LLVM.h
clang/lib/CodeGen/CGStmtOpenMP.cpp
clang/lib/Frontend/CompilerInvocation.cpp
Index: clang/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -663,7 +663,7 @@
// 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 @@
// 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.
Index: clang/lib/CodeGen/CGStmtOpenMP.cpp
===================================================================
--- clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -1913,7 +1913,7 @@
emitCapturedStmtCall(CodeGenFunction &ParentCGF, EmittedClosureTy Cap,
llvm::ArrayRef<llvm::Value *> Args) {
// Append the closure context to the argument.
- llvm::SmallVector<llvm::Value *> EffectiveArgs;
+ SmallVector<llvm::Value *> EffectiveArgs;
EffectiveArgs.reserve(Args.size() + 1);
llvm::append_range(EffectiveArgs, Args);
EffectiveArgs.push_back(Cap.second);
Index: clang/include/clang/Basic/LLVM.h
===================================================================
--- clang/include/clang/Basic/LLVM.h
+++ clang/include/clang/Basic/LLVM.h
@@ -22,6 +22,9 @@
// None.h includes an enumerator that is desired & cannot be forward declared
// without a definition of NoneType.
#include "llvm/ADT/None.h"
+// Add this header as a workaround to prevent `too few template arguments for
+// class template 'SmallVector'` building error with build compilers like XL.
+#include "llvm/ADT/SmallVector.h"
namespace llvm {
// ADT's.
Index: clang/lib/Frontend/CompilerInvocation.cpp
===================================================================
--- clang/lib/Frontend/CompilerInvocation.cpp
+++ clang/lib/Frontend/CompilerInvocation.cpp
@@ -663,7 +663,7 @@
// 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 @@
// 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.
Index: clang/lib/CodeGen/CGStmtOpenMP.cpp
===================================================================
--- clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -1913,7 +1913,7 @@
emitCapturedStmtCall(CodeGenFunction &ParentCGF, EmittedClosureTy Cap,
llvm::ArrayRef<llvm::Value *> Args) {
// Append the closure context to the argument.
- llvm::SmallVector<llvm::Value *> EffectiveArgs;
+ SmallVector<llvm::Value *> EffectiveArgs;
EffectiveArgs.reserve(Args.size() + 1);
llvm::append_range(EffectiveArgs, Args);
EffectiveArgs.push_back(Cap.second);
Index: clang/include/clang/Basic/LLVM.h
===================================================================
--- clang/include/clang/Basic/LLVM.h
+++ clang/include/clang/Basic/LLVM.h
@@ -22,6 +22,9 @@
// None.h includes an enumerator that is desired & cannot be forward declared
// without a definition of NoneType.
#include "llvm/ADT/None.h"
+// Add this header as a workaround to prevent `too few template arguments for
+// class template 'SmallVector'` building error with build compilers like XL.
+#include "llvm/ADT/SmallVector.h"
namespace llvm {
// ADT's.
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits