[PATCH] D21943: Add 'thin_lto_imported' metadata to imported function

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 1 16:40:00 PDT 2016


tejohnson added inline comments.

================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:597
@@ +596,3 @@
+                      llvm::MDNode::get(DestModule.getContext(),
+                                        llvm::ArrayRef<llvm::Metadata *>()));
+        GlobalsToImport.insert(&F);
----------------
eraman wrote:
> It will be more useful to name this something like thin_lto_src_module and attach the source module's name.  
I like the module name idea as well. We'd want to ensure that the module name MDString is uniqued though.

================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:614
@@ -609,3 +613,3 @@
     }
-    for (auto &GV : SrcModule->aliases()) {
-      if (!GV.hasName())
+    for (GlobalAlias &GA : SrcModule->aliases()) {
+      if (!GA.hasName())
----------------
Is the GV->GA name change in this block needed? Ah I see from the patch description that this was done for readability - can you make the renaming here and in the above loop a separate earlier NFC patch?


Repository:
  rL LLVM

http://reviews.llvm.org/D21943





More information about the llvm-commits mailing list