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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369747
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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));
}
}
@FastcallFunction@4
StdcallAlias@4==StdcallFunction@4
??_7exception@@6B@
+StdcallExportName@4=StdcallInternalFunction@4
; CHECK: Name type: noprefix
; CHECK: Symbol: __imp__CdeclFunction
; CHECK: Symbol: ??_7exception@@6B@
; CHECK-NM: W _StdcallAlias@4
; CHECK-NM: U _StdcallFunction@4
+; CHECK: Symbol: __imp__StdcallExportName@4{{$}}
+; CHECK: Symbol: _StdcallExportName@4{{$}}