diff options
Diffstat (limited to 'llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp')
-rw-r--r-- | llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp b/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp index eb9b9c3b264..3891efae57b 100644 --- a/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp +++ b/llvm/lib/ToolDrivers/llvm-dlltool/DlltoolDriver.cpp @@ -165,8 +165,9 @@ int llvm::dlltoolDriverMain(llvm::ArrayRef<const char *> ArgsArr) { E.SymbolName = E.Name; // Trim off the trailing decoration. Symbols will always have a // starting prefix here (either _ for cdecl/stdcall, @ for fastcall - // or ? for C++ functions). (Vectorcall functions also will end up having - // a prefix here, even if they shouldn't.) + // or ? for C++ functions). Vectorcall functions won't have any + // fixed prefix, but the function base name will still be at least + // one char. E.Name = E.Name.substr(0, E.Name.find('@', 1)); // By making sure E.SymbolName != E.Name for decorated symbols, // writeImportLibrary writes these symbols with the type |