summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2017-08-16 05:13:16 +0000
committerMartin Storsjo <martin@martin.st>2017-08-16 05:13:16 +0000
commita238b20e23970282b2c4a477f7bf8ebd515e9d83 (patch)
treefb2eb220aaa3be588cd765f7436bb4c4ecbedc64 /llvm/lib/Object
parenta9487d92d74c60d9d65a2880d08901354f4eea7a (diff)
downloadbcm5719-llvm-a238b20e23970282b2c4a477f7bf8ebd515e9d83.tar.gz
bcm5719-llvm-a238b20e23970282b2c4a477f7bf8ebd515e9d83.zip
[COFF] Add SymbolName as a distinct field in COFFImportFile
The previous Name and ExtName aren't enough to convey all the nuances between weak aliases and stdcall decorated function names. A test for this will be added in LLD. Differential Revision: https://reviews.llvm.org/D36544 llvm-svn: 310988
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r--llvm/lib/Object/COFFImportFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Object/COFFImportFile.cpp b/llvm/lib/Object/COFFImportFile.cpp
index 670c4bb7dd1..8d0f82e2b92 100644
--- a/llvm/lib/Object/COFFImportFile.cpp
+++ b/llvm/lib/Object/COFFImportFile.cpp
@@ -590,7 +590,7 @@ std::error_code writeImportLibrary(StringRef ImportName, StringRef Path,
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
OpenPOWER on IntegriCloud