[llvm] [llvm-dlltool] Use EXPORTAS name type for renamed imports on ARM64EC. (PR #99346)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 19 14:29:45 PDT 2024
================
@@ -729,7 +729,10 @@ Error writeImportLibrary(StringRef ImportName, StringRef Path,
else if (Machine == IMAGE_FILE_MACHINE_I386 &&
applyNameType(IMPORT_NAME_NOPREFIX, Name) == E.ImportName)
NameType = IMPORT_NAME_NOPREFIX;
- else if (Name == E.ImportName)
+ else if (isArm64EC(M)) {
+ NameType = IMPORT_NAME_EXPORTAS;
----------------
mstorsjo wrote:
Btw, entirely unrelated side note, but I was wondering, do we have any actual evidence pointing towards the fact that this name type really should be called `EXPORTAS`? I guess the only official "upstream" reference to the name is that the MSVC tools support an `EXPORTAS` keyword in def files, to achieve this, but that doesn't strictly say that the name type should be called that.
My main gripe is that when dealing with import libraries, having _import_ entries be called `exportas`, feels a bit inconsitent. But I don't have any better suggestion, and using an upstream name probably still is better than making up a name of our own? (Or are the existing names, e.g. `IMPORT_NAME_UNDECORATE`, also made up locally?)
https://github.com/llvm/llvm-project/pull/99346
More information about the llvm-commits
mailing list