[PATCH] D41849: Make internal/private GVs implicitly dso_local

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 11:15:56 PST 2018


sfertile added a comment.

This is a really good idea, LGTM.



================
Comment at: llvm/lib/AsmParser/LLParser.cpp:829
   GA->setUnnamedAddr(UnnamedAddr);
-  GA->setDSOLocal(DSOLocal);
+  if (DSOLocal)
+    GA->setDSOLocal(true);
----------------
We should probably add a short comment explaining why we only set this when its true now, since from here its not obvious that setting the linkage may have already set it to local.


================
Comment at: llvm/test/Bitcode/thinlto-summary-section.ll:7
 
-; Flags should be 0x17 (23) for local linkage (0x3) and not being importable
+; Flags should be 0x17 (87) for local linkage (0x3), dso_local (0x40) and not being importable
 ; (0x10) due to local linkage plus having a section.
----------------
This should say  `Flags should be 0x57 (87) for ...,


https://reviews.llvm.org/D41849





More information about the llvm-commits mailing list