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) {


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) {
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to