[PATCH] D20290: [ThinLTO] Refactor ODR resolution and internalization (NFC)

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 08:52:44 PDT 2016


joker.eph added inline comments.

================
Comment at: lib/LTO/LTO.cpp:90
@@ +89,3 @@
+      if (GlobalValue::isLocalLinkage(S->linkage()))
+        S->setLinkage(GlobalValue::ExternalLinkage);
+    } else {
----------------
tejohnson wrote:
> joker.eph wrote:
> > tejohnson wrote:
> > > joker.eph wrote:
> > > > This does not sound correct to me.
> > > This is needed so that it is not internalized again in thinLTOInternalizeModule (which runs after promotion).
> > I see...
> > The issue is that this function is called *internalize* and is doing *promotion*.
> Good point - how about if I change the name of this and the caller to something like "thinLTOHandleExported(GUID|InIndex)" ?
changing the name would be OK to me, whatever you figure is best. 
`HandleExported` does not sound very explicit to me, what about something like `resolveLinkage` or `InternalizeAndPromote`?


http://reviews.llvm.org/D20290





More information about the llvm-commits mailing list