[PATCH] D36548: [llvm-dlltool] Fix creating stdcall import libraries for MinGW/i386

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 9 13:46:06 PDT 2017


mstorsjo added inline comments.


================
Comment at: lib/Object/COFFModuleDefinition.cpp:232
+        E.SymbolName = E.Name;
+        E.Name = E.Name.substr(0, E.Name.find('@'));
+      }
----------------
rnk wrote:
> Surely this doesn't work for fastcall functions, though? They look like @foo at 4
Hmm, indeed, that's true. Haven't seen such, but they are used in mingw so they clearly need to be handled.

I think it would work with just using `rfind` instead of `find`, what do you think?

Unrelatedly - do you think we should move this whole block into the dlltool driver instead, since it's mingw specific? We could do a pass over the exports after parsing the def, before passing it to the writer.


https://reviews.llvm.org/D36548





More information about the llvm-commits mailing list