[lld] r340400 - [COFF] Move a comment close to the code it refers to. NFC.

Martin Storsjo via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 22 04:35:02 PDT 2018


Author: mstorsjo
Date: Wed Aug 22 04:35:02 2018
New Revision: 340400

URL: http://llvm.org/viewvc/llvm-project?rev=340400&view=rev
Log:
[COFF] Move a comment close to the code it refers to. NFC.

Modified:
    lld/trunk/COFF/Chunks.cpp

Modified: lld/trunk/COFF/Chunks.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Chunks.cpp?rev=340400&r1=340399&r2=340400&view=diff
==============================================================================
--- lld/trunk/COFF/Chunks.cpp (original)
+++ lld/trunk/COFF/Chunks.cpp Wed Aug 22 04:35:02 2018
@@ -315,9 +315,6 @@ void SectionChunk::writeTo(uint8_t *Buf)
 
     uint8_t *Off = Buf + OutputSectionOff + Rel.VirtualAddress;
 
-    // Get the output section of the symbol for this relocation.  The output
-    // section is needed to compute SECREL and SECTION relocations used in debug
-    // info.
     auto *Sym =
         dyn_cast_or_null<Defined>(File->getSymbol(Rel.SymbolTableIndex));
     if (!Sym) {
@@ -332,6 +329,9 @@ void SectionChunk::writeTo(uint8_t *Buf)
       error("relocation against symbol in discarded section: " + Name);
       continue;
     }
+    // Get the output section of the symbol for this relocation.  The output
+    // section is needed to compute SECREL and SECTION relocations used in debug
+    // info.
     Chunk *C = Sym->getChunk();
     OutputSection *OS = C ? C->getOutputSection() : nullptr;
 




More information about the llvm-commits mailing list