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

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 9 13:48:28 PDT 2017

rnk added inline comments.

Comment at: lib/Object/COFFModuleDefinition.cpp:232
+        E.SymbolName = E.Name;
+        E.Name = E.Name.substr(0, E.Name.find('@'));
+      }
mstorsjo wrote:
> 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.
Unfortunately, vectorcall messes `rfind` up, it does foo@@4: https://msdn.microsoft.com/en-us/library/deaxefa7.aspx


More information about the llvm-commits mailing list