[PATCH] D108421: Mark openmp internal global dso_local
kamlesh kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 19 20:05:42 PDT 2021
kamleshbhalui updated this revision to Diff 367700.
kamleshbhalui added a comment.
clang formatted
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108421/new/
https://reviews.llvm.org/D108421
Files:
clang/lib/CodeGen/CGOpenMPRuntime.cpp
Index: clang/lib/CodeGen/CGOpenMPRuntime.cpp
===================================================================
--- clang/lib/CodeGen/CGOpenMPRuntime.cpp
+++ clang/lib/CodeGen/CGOpenMPRuntime.cpp
@@ -2179,11 +2179,14 @@
return &*Elem.second;
}
- return Elem.second = new llvm::GlobalVariable(
- CGM.getModule(), Ty, /*IsConstant*/ false,
- llvm::GlobalValue::CommonLinkage, llvm::Constant::getNullValue(Ty),
- Elem.first(), /*InsertBefore=*/nullptr,
- llvm::GlobalValue::NotThreadLocal, AddressSpace);
+ llvm::GlobalVariable *GV = new llvm::GlobalVariable(
+ CGM.getModule(), Ty, /*IsConstant*/ false,
+ llvm::GlobalValue::CommonLinkage, llvm::Constant::getNullValue(Ty),
+ Elem.first(), /*InsertBefore=*/nullptr, llvm::GlobalValue::NotThreadLocal,
+ AddressSpace);
+ GV->setDSOLocal(true);
+ Elem.second = GV;
+ return Elem.second;
}
llvm::Value *CGOpenMPRuntime::getCriticalRegionLock(StringRef CriticalName) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108421.367700.patch
Type: text/x-patch
Size: 1001 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210820/67c8bef3/attachment.bin>
More information about the cfe-commits
mailing list