[PATCH] D47497: [COFF] Unify output section code. NFC

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 29 15:07:21 PDT 2018


pcc added inline comments.


================
Comment at: COFF/Writer.cpp:611
+
+  switch (Def->kind()) {
+  case Symbol::DefinedAbsoluteKind:
----------------
You can move the if on line 606 into the switch as well.


================
Comment at: COFF/Writer.cpp:620
+    Chunk *C = Def->getChunk();
+    assert(C && "non-absolute and non-synthetic symbol without a chunk");
+    OutputSection *OS = C->getOutputSection();
----------------
I'd drop the assert here and combine line 619 and 621 into one.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D47497





More information about the llvm-commits mailing list