[llvm] [llvm-dlltool] Use EXPORTAS name type for renamed imports on ARM64EC. (PR #99346)

Jacek Caban via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 21 12:11:20 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;
----------------
cjacek wrote:

While it's not documented, there is `IMPORT_OBJECT_NAME_EXPORTAS` defined in a public `winnt.h` header (and other `ImportNameType` otherwise follow `winnt.h` names). IIRC dumpbin also used that name.

It's not great when dealing with imports, but it seems better for consistency.

https://github.com/llvm/llvm-project/pull/99346


More information about the llvm-commits mailing list