[PATCH] D21577: [LTO] Asm undefs should be included in llvm.compiler_used
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 21 18:31:49 PDT 2016
ruiu added a subscriber: ruiu.
================
Comment at: ELF/LTO.cpp:190-201
@@ +189,14 @@
+
+ // This is an undefined reference to a symbol
+ // referenced from asm. We put that in compiler.used,
+ // so that we can preserve it from being dropped from
+ // the output, without necessarily preventing its
+ // internalization.
+ SmallString<64> Buffer;
+ {
+ raw_svector_ostream OS(Buffer);
+ Sym.printName(OS);
+ }
+ const char *Name = Buffer.c_str();
+ AsmUndefinedRefs[Name] = 1;
+ }
----------------
This function is already too long. Can you separate this code as a new function?
================
Comment at: ELF/LTO.cpp:201
@@ +200,3 @@
+ const char *Name = Buffer.c_str();
+ AsmUndefinedRefs[Name] = 1;
+ }
----------------
`AsmUndefinedRefs.insert(Name)` since it is a set.
http://reviews.llvm.org/D21577
More information about the llvm-commits
mailing list