[PATCH] D18836: Make aliases explicit in the module summary

Mehdi AMINI via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 8 01:29:15 PDT 2016


joker.eph added inline comments.

================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:2929
@@ -2923,1 +2928,3 @@
+    // ThinLTO and should be renamed.
+    assert(F.hasName());
 
----------------
tejohnson wrote:
> Won't this cause assert for anonymous function in thinlto-function-summary.ll test?
Yes, until we name them :) 

================
Comment at: lib/Bitcode/Writer/BitcodeWriter.cpp:2941
@@ -2933,2 +2940,3 @@
+    // ThinLTO and should be renamed, but if any remains here, just skip them.
     if (!F.hasName())
       continue;
----------------
tejohnson wrote:
> Saw that you sent a patch to rename them on which this is dependent (will review that tomorrow morn). Assuming that goes in first, perhaps this should stay an assert? Ditto for the continue you added below to the alias loop.
That's why I put the assert originally. But then I wasn't sure anymore: should we forbid `llvm-as -module-summary test.ll` when it contains an alias to an anonymous function? 
The current implementation will accept it, but the alias will just not be present in the summary.


http://reviews.llvm.org/D18836





More information about the llvm-commits mailing list