[clang] 561fb7f - [NFC] Use llvm::SmallVector to workaround XL compiler problem on AIX
Xiangling Liao via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 9 10:04:10 PST 2021
Author: Xiangling Liao
Date: 2021-03-09T13:03:52-05:00
New Revision: 561fb7f60ab631e712c3fb6bbeb47061222c6818
URL: https://github.com/llvm/llvm-project/commit/561fb7f60ab631e712c3fb6bbeb47061222c6818
DIFF: https://github.com/llvm/llvm-project/commit/561fb7f60ab631e712c3fb6bbeb47061222c6818.diff
LOG: [NFC] Use llvm::SmallVector to workaround XL compiler problem on AIX
LLVM is recommending to use SmallVector (that is, omitting the N), in the
absence of a well-motivated choice for the number of inlined elements N.
However, this doesn't work well with XL compiler on AIX since some header(s)
aren't properly picked up with it. We need to take a further look into the real
issue underneath and fix it in a later patch.
But currently we'd like to use this patch to unblock the build compiler issue
first.
Differential Revision: https://reviews.llvm.org/D98265
Added:
Modified:
clang/lib/CodeGen/CGStmtOpenMP.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index 2eaa481cd911..575d1143caab 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -1913,7 +1913,7 @@ static llvm::CallInst *
emitCapturedStmtCall(CodeGenFunction &ParentCGF, EmittedClosureTy Cap,
llvm::ArrayRef<llvm::Value *> Args) {
// Append the closure context to the argument.
- SmallVector<llvm::Value *> EffectiveArgs;
+ llvm::SmallVector<llvm::Value *> EffectiveArgs;
EffectiveArgs.reserve(Args.size() + 1);
llvm::append_range(EffectiveArgs, Args);
EffectiveArgs.push_back(Cap.second);
More information about the cfe-commits
mailing list