[lld] [llvm] [COFF] Rename the COFFShortExport::AliasTarget field (PR #89039)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 17 02:10:31 PDT 2024
================
@@ -98,9 +98,11 @@ struct COFFShortExport {
/// "/export:foo=bar", this could be "_bar at 8" if bar is stdcall.
std::string SymbolName;
- /// Creates a weak alias. This is the name of the weak aliasee. In a .def
+ /// Creates an import library entry that imports from a DLL export with a
+ /// different name. This is the name of the DLL export that should be
+ /// referenced when linking against this import library entry. In a .def
/// file, this is "baz" in "EXPORTS\nfoo = bar == baz".
- std::string AliasTarget;
+ std::string ImportTarget;
----------------
mstorsjo wrote:
When trying to describe this field, the other field `ExtName` has a role very close to this one, but they're used in quite different contexts (the form of renaming a symbol at export, like `/export:foo=bar`, is only relevant while linking a DLL (and creating an import library at the same time), while this style, with renaming like `foo == bar`, mostly is relevant when creating an import library from a plain def file, with dlltool style tools.
I didn't want to try to unify them into one single field, as there are lots of small nuances (and big behaviour differences) between the two.
But I wanted to rename the `AliasTarget` field, because as long as it is named that way, it is very hard to reason about it as anything else than an alias, even though it's not necessarily an alias at all.
https://github.com/llvm/llvm-project/pull/89039
More information about the llvm-commits
mailing list