std::error_code printSymbolName(raw_ostream &OS,
DataRefImpl Symb) const override {
- if (Symb.p == 1)
+ if (Symb.p == 0)
OS << "__imp_";
OS << StringRef(Data.getBufferStart() + sizeof(coff_import_header));
return std::error_code();
RUN: llvm-nm -M %t.a | FileCheck --check-prefix=COFF-SHORT-IMPORT %s
COFF-SHORT-IMPORT: Archive map
-COFF-SHORT-IMPORT-NEXT: _foo in coff-short-import-code
COFF-SHORT-IMPORT-NEXT: __imp__foo in coff-short-import-code
-COFF-SHORT-IMPORT-NEXT: _bar in coff-short-import-data
-COFF-SHORT-IMPORT-NOT: __imp__bar in coff-short-import-data
+COFF-SHORT-IMPORT-NEXT: _foo in coff-short-import-code
+COFF-SHORT-IMPORT-NEXT: __imp__bar in coff-short-import-data
+COFF-SHORT-IMPORT-NOT: _bar in coff-short-import-data
Test that we pad the symbol table so that it ends in a multiple of 4 bytes:
8 + 60 + 36 == 104
COFF-IMPORTLIB: Format: COFF-import-file
COFF-IMPORTLIB-NEXT: Type: code
COFF-IMPORTLIB-NEXT: Name type: noprefix
-COFF-IMPORTLIB-NEXT: Symbol: _func
COFF-IMPORTLIB-NEXT: Symbol: __imp__func
+COFF-IMPORTLIB-NEXT: Symbol: _func