mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[llvm-dlltool] Make sure to strip decorations from ExtName for renamed exports
ExtName should not be decorated, just like Name. This avoids double decoration on symbols in import libraries that use = for renaming functions. (Weak aliases, which use ==, worked fine with respect to decoration.) Differential Revision: https://reviews.llvm.org/D66617 llvm-svn: 369747
This commit is contained in:
parent
70beec6084
commit
fc1674233c
@ -171,6 +171,7 @@ int llvm::dlltoolDriverMain(llvm::ArrayRef<const char *> ArgsArr) {
|
||||
// By making sure E.SymbolName != E.Name for decorated symbols,
|
||||
// writeImportLibrary writes these symbols with the type
|
||||
// IMPORT_NAME_UNDECORATE.
|
||||
E.ExtName = E.ExtName.substr(0, E.ExtName.find('@', 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ StdcallFunction@4
|
||||
@FastcallFunction@4
|
||||
StdcallAlias@4==StdcallFunction@4
|
||||
??_7exception@@6B@
|
||||
StdcallExportName@4=StdcallInternalFunction@4
|
||||
|
||||
; CHECK: Name type: noprefix
|
||||
; CHECK: Symbol: __imp__CdeclFunction
|
||||
@ -24,3 +25,5 @@ StdcallAlias@4==StdcallFunction@4
|
||||
; CHECK: Symbol: ??_7exception@@6B@
|
||||
; CHECK-NM: W _StdcallAlias@4
|
||||
; CHECK-NM: U _StdcallFunction@4
|
||||
; CHECK: Symbol: __imp__StdcallExportName@4{{$}}
|
||||
; CHECK: Symbol: _StdcallExportName@4{{$}}
|
||||
|
Loading…
x
Reference in New Issue
Block a user