[lld] r245676 - COFF: Fix /lldmap option.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 00:01:08 PDT 2015


Author: ruiu
Date: Fri Aug 21 02:01:08 2015
New Revision: 245676

URL: http://llvm.org/viewvc/llvm-project?rev=245676&view=rev
Log:
COFF: Fix /lldmap option.

isLive returns false if it's not COMDAT, so check for that condition.

Modified:
    lld/trunk/COFF/SymbolTable.cpp

Modified: lld/trunk/COFF/SymbolTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/SymbolTable.cpp?rev=245676&r1=245675&r2=245676&view=diff
==============================================================================
--- lld/trunk/COFF/SymbolTable.cpp (original)
+++ lld/trunk/COFF/SymbolTable.cpp Fri Aug 21 02:01:08 2015
@@ -325,7 +325,7 @@ void SymbolTable::printMap(llvm::raw_ost
     OS << File->getShortName() << ":\n";
     for (SymbolBody *Body : File->getSymbols())
       if (auto *R = dyn_cast<DefinedRegular>(Body))
-        if (R->isLive())
+        if (!R->isCOMDAT() || R->isLive())
           OS << Twine::utohexstr(Config->ImageBase + R->getRVA())
              << " " << R->getName() << "\n";
   }




More information about the llvm-commits mailing list