summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-08-22 11:35:02 +0000
committerMartin Storsjo <martin@martin.st>2018-08-22 11:35:02 +0000
commitc0ee24033cac0ec94741c86119de3bebbcbd7d91 (patch)
tree5a2e790f72b0775b188c1510540332cd8fcc592a
parent6c67e0434501e3bf84143f70a00bb9085905be1c (diff)
downloadbcm5719-llvm-c0ee24033cac0ec94741c86119de3bebbcbd7d91.tar.gz
bcm5719-llvm-c0ee24033cac0ec94741c86119de3bebbcbd7d91.zip
[COFF] Move a comment close to the code it refers to. NFC.
llvm-svn: 340400
-rw-r--r--lld/COFF/Chunks.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lld/COFF/Chunks.cpp b/lld/COFF/Chunks.cpp
index 6be55a63de4..d7f4f43c8d5 100644
--- a/lld/COFF/Chunks.cpp
+++ b/lld/COFF/Chunks.cpp
@@ -315,9 +315,6 @@ void SectionChunk::writeTo(uint8_t *Buf) const {
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) const {
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;
OpenPOWER on IntegriCloud