[PATCH] D23540: COFF: Fix short import lib import name type bitshift

Martell Malone via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 1 16:19:17 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL283055: COFF: Fix short import lib import name type bitshift (authored by martell).

Changed prior to commit:
  https://reviews.llvm.org/D23540?vs=68145&id=73204#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23540

Files:
  llvm/trunk/include/llvm/Support/COFF.h
  llvm/trunk/test/tools/llvm-readobj/Inputs/library.lib
  llvm/trunk/test/tools/llvm-readobj/coff-exports-implib.test


Index: llvm/trunk/test/tools/llvm-readobj/coff-exports-implib.test
===================================================================
--- llvm/trunk/test/tools/llvm-readobj/coff-exports-implib.test
+++ llvm/trunk/test/tools/llvm-readobj/coff-exports-implib.test
@@ -3,20 +3,24 @@
 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
 
Index: llvm/trunk/include/llvm/Support/COFF.h
===================================================================
--- llvm/trunk/include/llvm/Support/COFF.h
+++ llvm/trunk/include/llvm/Support/COFF.h
@@ -657,7 +657,7 @@
     }
 
     ImportNameType getNameType() const {
-      return static_cast<ImportNameType>((TypeInfo & 0x1C) >> 3);
+      return static_cast<ImportNameType>((TypeInfo & 0x1C) >> 2);
     }
   };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23540.73204.patch
Type: text/x-patch
Size: 1254 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161001/b62f52d5/attachment.bin>


More information about the llvm-commits mailing list