diff --git a/llvm/include/llvm/Support/COFF.h b/llvm/include/llvm/Support/COFF.h index 7dad3e82bda6..1ca781b981e5 100644 --- a/llvm/include/llvm/Support/COFF.h +++ b/llvm/include/llvm/Support/COFF.h @@ -657,7 +657,7 @@ namespace COFF { } ImportNameType getNameType() const { - return static_cast((TypeInfo & 0x1C) >> 3); + return static_cast((TypeInfo & 0x1C) >> 2); } }; diff --git a/llvm/test/tools/llvm-readobj/Inputs/library.lib b/llvm/test/tools/llvm-readobj/Inputs/library.lib index 193380dd4858..7ad7c9052ea8 100755 Binary files a/llvm/test/tools/llvm-readobj/Inputs/library.lib and b/llvm/test/tools/llvm-readobj/Inputs/library.lib differ diff --git a/llvm/test/tools/llvm-readobj/coff-exports-implib.test b/llvm/test/tools/llvm-readobj/coff-exports-implib.test index 9715109b3d52..2b327384b255 100644 --- a/llvm/test/tools/llvm-readobj/coff-exports-implib.test +++ b/llvm/test/tools/llvm-readobj/coff-exports-implib.test @@ -3,20 +3,24 @@ RUN: llvm-readobj -coff-exports %p/Inputs/library.lib | FileCheck %s CHECK: File: library.dll CHECK: Format: COFF-import-file CHECK: Type: const +CHECK: Name type: undecorate CHECK: Symbol: __imp__constant CHECK: File: library.dll CHECK: Format: COFF-import-file CHECK: Type: data +CHECK: Name type: noprefix CHECK: Symbol: __imp__data CHECK: File: library.dll CHECK: Format: COFF-import-file CHECK: Type: code +CHECK: Name type: name CHECK: Symbol: __imp__function CHECK: File: library.dll CHECK: Format: COFF-import-file CHECK: Type: code +CHECK: Name type: ordinal CHECK: Symbol: __imp__ordinal