[PATCH] D37059: [ELF] - LTO: do not optimize away symbols accessed from linkerscript.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 15 14:17:45 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/LTO.cpp:168
       undefine(Sym);
-    R.LinkerRedefined = Config->RenamedSymbols.count(Sym);
+    // We tell LTO to not apply IPO for following symbols.
+    R.LinkerRedefined =
----------------
grimar wrote:
> ruiu wrote:
> > "following symbols" doesn't explain what this code is for. It's basically saying that this code does something as is written. Please update the comment.
> Done.
This commend needs to explain "why" instead of "what", as what this code does is obvious by, well, code.


================
Comment at: ELF/LTO.cpp:134
 
+  llvm::DenseSet<StringRef> ScriptSymbols;
+  for (BaseCommand *Base : Script->Opt.Commands)
----------------
Remove `llvm::`.


https://reviews.llvm.org/D37059





More information about the llvm-commits mailing list