[PATCH] D36633: [COFF] Make the weak aliases optional
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 22:24:01 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL310991: [COFF] Make the weak aliases optional (authored by mstorsjo).
Changed prior to commit:
https://reviews.llvm.org/D36633?vs=110791&id=111309#toc
Repository:
rL LLVM
https://reviews.llvm.org/D36633
Files:
llvm/trunk/include/llvm/Object/COFFImportFile.h
llvm/trunk/lib/Object/COFFImportFile.cpp
llvm/trunk/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
Index: llvm/trunk/include/llvm/Object/COFFImportFile.h
===================================================================
--- llvm/trunk/include/llvm/Object/COFFImportFile.h
+++ llvm/trunk/include/llvm/Object/COFFImportFile.h
@@ -99,7 +99,8 @@
std::error_code writeImportLibrary(StringRef ImportName,
StringRef Path,
ArrayRef<COFFShortExport> Exports,
- COFF::MachineTypes Machine);
+ COFF::MachineTypes Machine,
+ bool MakeWeakAliases);
} // namespace object
} // namespace llvm
Index: llvm/trunk/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
===================================================================
--- llvm/trunk/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
+++ llvm/trunk/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp
@@ -171,7 +171,7 @@
}
}
- if (writeImportLibrary(Def->OutputFile, Path, Def->Exports, Machine))
+ if (writeImportLibrary(Def->OutputFile, Path, Def->Exports, Machine, true))
return 1;
return 0;
}
Index: llvm/trunk/lib/Object/COFFImportFile.cpp
===================================================================
--- llvm/trunk/lib/Object/COFFImportFile.cpp
+++ llvm/trunk/lib/Object/COFFImportFile.cpp
@@ -560,7 +560,7 @@
std::error_code writeImportLibrary(StringRef ImportName, StringRef Path,
ArrayRef<COFFShortExport> Exports,
- MachineTypes Machine) {
+ MachineTypes Machine, bool MakeWeakAliases) {
std::vector<NewArchiveMember> Members;
ObjectFactory OF(llvm::sys::path::filename(ImportName), Machine);
@@ -578,7 +578,7 @@
if (E.Private)
continue;
- if (E.isWeak()) {
+ if (E.isWeak() && MakeWeakAliases) {
Members.push_back(OF.createWeakExternal(E.Name, E.ExtName, false));
Members.push_back(OF.createWeakExternal(E.Name, E.ExtName, true));
continue;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36633.111309.patch
Type: text/x-patch
Size: 2052 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170816/7533e499/attachment.bin>
More information about the llvm-commits
mailing list