[PATCH] D108421: Mark openmp internal global dso_local

kamlesh kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 21 03:37:12 PDT 2021


kamleshbhalui updated this revision to Diff 367954.
kamleshbhalui added a comment.

assume dso local if relocation model static


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108421/new/

https://reviews.llvm.org/D108421

Files:
  llvm/lib/Target/TargetMachine.cpp


Index: llvm/lib/Target/TargetMachine.cpp
===================================================================
--- llvm/lib/Target/TargetMachine.cpp
+++ llvm/lib/Target/TargetMachine.cpp
@@ -149,6 +149,11 @@
     return GV->isStrongDefinitionForLinker();
   }
 
+  if (TT.isOSBinFormatELF()) {
+    if (RM == Reloc::Static)
+      return true;
+  }
+
   // Due to the AIX linkage model, any global with default visibility is
   // considered non-local.
   if (TT.isOSBinFormatXCOFF())


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D108421.367954.patch
Type: text/x-patch
Size: 483 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210821/7ce26666/attachment.bin>


More information about the llvm-commits mailing list