aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFImportFile.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2024-04-18 13:29:38 +0300
committerGitHub <noreply@github.com>2024-04-18 13:29:38 +0300
commit750de326ef0408df4a5f91773c355ded1a1b1b77 (patch)
tree3881ee43762e7baa4912299f741e907b9af69143 /llvm/lib/Object/COFFImportFile.cpp
parent3e64f8a4e74cdcaf5920879c86e7e0a827f6ec13 (diff)
downloadllvm-750de326ef0408df4a5f91773c355ded1a1b1b77.zip
llvm-750de326ef0408df4a5f91773c355ded1a1b1b77.tar.gz
llvm-750de326ef0408df4a5f91773c355ded1a1b1b77.tar.bz2
[COFF] Rename the COFFShortExport::AliasTarget field. NFC. (#89039)
It turns out that the previous name is vaguely misleading. When operating on a def file like "symbolname == dllname", that is supposed to make an import library entry, that when the symbol "symbolname" links against this, it imports the DLL symbol "dllname" from the referenced DLL. This doesn't need to involve any alias, and it doesn't need to imply that "dllname" is available on its own as a separate symbol in the import library at all. GNU dlltool implements import libraries in the form of "long import library", where each member is a regular object file with section chunks that compose the relevant .idata section pieces. There, this kind of import renaming does not involve any form of aliases, but the right .idata section just gets a different string than the symbol name.
Diffstat (limited to 'llvm/lib/Object/COFFImportFile.cpp')
-rw-r--r--llvm/lib/Object/COFFImportFile.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Object/COFFImportFile.cpp b/llvm/lib/Object/COFFImportFile.cpp
index 48c3ea0..fd8aca3 100644
--- a/llvm/lib/Object/COFFImportFile.cpp
+++ b/llvm/lib/Object/COFFImportFile.cpp
@@ -690,9 +690,9 @@ Error writeImportLibrary(StringRef ImportName, StringRef Path,
Name.swap(*ReplacedName);
}
- if (!E.AliasTarget.empty() && Name != E.AliasTarget) {
- Members.push_back(OF.createWeakExternal(E.AliasTarget, Name, false, M));
- Members.push_back(OF.createWeakExternal(E.AliasTarget, Name, true, M));
+ if (!E.ImportName.empty() && Name != E.ImportName) {
+ Members.push_back(OF.createWeakExternal(E.ImportName, Name, false, M));
+ Members.push_back(OF.createWeakExternal(E.ImportName, Name, true, M));
continue;
}