[lld] r260380 - Use a SymbolBody to represent the personality.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 10 05:19:32 PST 2016


Author: rafael
Date: Wed Feb 10 07:19:32 2016
New Revision: 260380

URL: http://llvm.org/viewvc/llvm-project?rev=260380&view=rev
Log:
Use a SymbolBody to represent the personality.

NFC, just more in line with the rest of lld.

Thanks to Rui for the suggestion.

Modified:
    lld/trunk/ELF/OutputSections.cpp
    lld/trunk/ELF/OutputSections.h

Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=260380&r1=260379&r2=260380&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Wed Feb 10 07:19:32 2016
@@ -1027,14 +1027,13 @@ void EHOutputSection<ELFT>::addSectionAu
       if (Config->EhFrameHdr)
         C.FdeEncoding = getFdeEncoding(D);
 
-      StringRef Personality;
+      SymbolBody *Personality = nullptr;
       if (HasReloc) {
         uint32_t SymIndex = RelI->getSymbol(Config->Mips64EL);
-        SymbolBody &Body = *S->getFile()->getSymbolBody(SymIndex)->repl();
-        Personality = Body.getName();
+        Personality = S->getFile()->getSymbolBody(SymIndex)->repl();
       }
 
-      std::pair<StringRef, StringRef> CieInfo(Entry, Personality);
+      std::pair<StringRef, SymbolBody *> CieInfo(Entry, Personality);
       auto P = CieMap.insert(std::make_pair(CieInfo, Cies.size()));
       if (P.second) {
         Cies.push_back(C);

Modified: lld/trunk/ELF/OutputSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.h?rev=260380&r1=260379&r2=260380&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.h (original)
+++ lld/trunk/ELF/OutputSections.h Wed Feb 10 07:19:32 2016
@@ -342,7 +342,7 @@ private:
   std::vector<Cie<ELFT>> Cies;
 
   // Maps CIE content + personality to a index in Cies.
-  llvm::DenseMap<std::pair<StringRef, StringRef>, unsigned> CieMap;
+  llvm::DenseMap<std::pair<StringRef, SymbolBody *>, unsigned> CieMap;
 };
 
 template <class ELFT>




More information about the llvm-commits mailing list