[PATCH] D15327: [ELF] - Implemented --print-gc-sections command line argument.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 01:15:29 PST 2015


grimar added inline comments.

================
Comment at: ELF/Writer.cpp:538
@@ +537,3 @@
+                     const std::unique_ptr<ObjectFile<ELFT>> &File) {
+  if (Config->PrintGcSections && IS && !IS->isLive())
+    llvm::errs() << Twine("removing unused section from '") +
----------------
ruiu wrote:
> Let's invert this condition to return early.
> 
>   if (!Config->PrintGcSections || !IS || Is->isLive())
>     return;
Done.

================
Comment at: ELF/Writer.cpp:539-541
@@ +538,5 @@
+  if (Config->PrintGcSections && IS && !IS->isLive())
+    llvm::errs() << Twine("removing unused section from '") +
+                        IS->getSectionName() + "' in file '" + File->getName() +
+                        "'"
+                 << "\n";
----------------
ruiu wrote:
>   llvm::errs() << "removing unused section from '" << IS->getSectionName()
>                << "' in file '" << File->getName() << "'\n";
> 
Done.


Repository:
  rL LLVM

http://reviews.llvm.org/D15327





More information about the llvm-commits mailing list