[PATCH] D21550: [lld] support --trace-symbol (alias -y) option

Rafael Ávila de Espíndola via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 12:39:06 PDT 2016


rafael added a subscriber: rafael.
rafael added a comment.

Please also add a test with --start-lib/--end-lib.


================
Comment at: ELF/InputFiles.cpp:322
@@ +321,3 @@
+    if (!ArchiveName.empty())
+      Msg += ArchiveName.str() + "(" + this->getName().str() + ")";
+    else
----------------
This is duplicated with elf::getFilename(InputFile *F).

================
Comment at: ELF/InputFiles.cpp:326
@@ +325,3 @@
+    Msg += ": definition of " + Name.str();
+    llvm::outs() << Msg << "\n";
+  }
----------------
I don't think you need the llvm:: prefix.

================
Comment at: ELF/InputFiles.cpp:341
@@ +340,3 @@
+    llvm::outs() << Msg << "\n";
+  }
+}
----------------
Can you share a bit more code with traceDefined?

================
Comment at: ELF/InputFiles.cpp:405
@@ -374,3 +404,3 @@
           ->body();
     return elf::Symtab<ELFT>::X->addRegular(Name, *Sym, Sec)->body();
   }
----------------
Don't you want to trace this?

================
Comment at: ELF/InputFiles.cpp:558
@@ -527,2 +557,3 @@
     if (Sym.isUndefined()) {
+      InputFile::traceUndefined(Name);
       Undefs.push_back(Name);
----------------
Do you really want to trace this? It is not a "real" undefined symbol. We will not fetch archive members or report an error for it.


http://reviews.llvm.org/D21550





More information about the llvm-commits mailing list