[PATCH] D21577: [LTO] Asm undefs should be included in llvm.compiler_used
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 07:40:21 PDT 2016
rafael accepted this revision.
rafael added a comment.
This revision is now accepted and ready to land.
LGTM with one last pass of reviews.
================
Comment at: ELF/LTO.cpp:28
@@ -27,2 +27,3 @@
#include "llvm/IR/Verifier.h"
+#include "llvm/LTO/UpdateCompilerUsed.h"
#include "llvm/Linker/IRMover.h"
----------------
Please make sure this builds with -DBUILD_SHARED_LIBS=ON.
================
Comment at: ELF/LTO.cpp:159
@@ +158,3 @@
+ StringSet<> &AsmUndefinedRefs) {
+ // GV associated => no asm, bail out.
+ if (GV)
----------------
s/no asm/not an assembly symbol/ I guess?
================
Comment at: ELF/LTO.cpp:163
@@ +162,3 @@
+
+ // This is an undefined reference to a symbol
+ // referenced from asm. We put that in compiler.used,
----------------
While are the comment lines so short?
I think you can drop the "referenced": This is an undefined reference to a symbol in asm".
================
Comment at: test/ELF/lto/asmundef.ll:23
@@ +22,2 @@
+
+; CHECK: @llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to i8*)], section "llvm.metadata"
----------------
Check that foo is internalized.
http://reviews.llvm.org/D21577
More information about the llvm-commits
mailing list