[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 22:36:40 PDT 2016


ruiu added inline comments.

================
Comment at: ELF/LTO.cpp:158
@@ +157,3 @@
+static void handleUndefinedAsmRefs(const BasicSymbolRef &Sym, GlobalValue *GV,
+                                   llvm::StringSet<> &AsmUndefinedRefs) {
+  // GV associated => no asm, bail out.
----------------
remove `llvm::`.

================
Comment at: ELF/LTO.cpp:169
@@ +168,3 @@
+  SmallString<64> Buffer;
+  {
+    raw_svector_ostream OS(Buffer);
----------------
I think you don't need this brace to create a scope. raw_svector_ostream is unbuffered so `Buffer` is always up-to-date.

================
Comment at: ELF/LTO.cpp:173
@@ +172,3 @@
+  }
+  const char *Name = Buffer.c_str();
+  AsmUndefinedRefs.insert(Name);
----------------
Why not `Buffer.str()`? I'd rename Buffer Name and just call `AsmUndefinedRefs.insert(Name.str())`


http://reviews.llvm.org/D21577





More information about the llvm-commits mailing list