[PATCH] D36544: [COFF] Add SymbolName as a distinct field in COFFImportFile

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 22:14:21 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL310988: [COFF] Add SymbolName as a distinct field in COFFImportFile (authored by mstorsjo).

Changed prior to commit:
  https://reviews.llvm.org/D36544?vs=110458&id=111306#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D36544

Files:
  llvm/trunk/include/llvm/Object/COFFImportFile.h
  llvm/trunk/lib/Object/COFFImportFile.cpp


Index: llvm/trunk/lib/Object/COFFImportFile.cpp
===================================================================
--- llvm/trunk/lib/Object/COFFImportFile.cpp
+++ llvm/trunk/lib/Object/COFFImportFile.cpp
@@ -590,7 +590,7 @@
     if (E.Constant)
       ImportType = IMPORT_CONST;
 
-    StringRef SymbolName = E.isWeak() ? E.ExtName : E.Name;
+    StringRef SymbolName = E.SymbolName.empty() ? E.Name : E.SymbolName;
     ImportNameType NameType = getNameType(SymbolName, E.Name, Machine);
     Expected<std::string> Name = E.ExtName.empty()
                                      ? SymbolName
Index: llvm/trunk/include/llvm/Object/COFFImportFile.h
===================================================================
--- llvm/trunk/include/llvm/Object/COFFImportFile.h
+++ llvm/trunk/include/llvm/Object/COFFImportFile.h
@@ -73,6 +73,7 @@
 struct COFFShortExport {
   std::string Name;
   std::string ExtName;
+  std::string SymbolName;
 
   uint16_t Ordinal = 0;
   bool Noname = false;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36544.111306.patch
Type: text/x-patch
Size: 988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170816/a90638ec/attachment.bin>


More information about the llvm-commits mailing list