From: Rui Ueyama <ruiu@google.com> Date: Wed, 8 Jul 2015 18:21:09 +0000 (+0000) Subject: Object/COFF: Fix import library's getNameType method. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c011edf2240f74b013a23ef9d59c13d38acff83a;p=oota-llvm.git Object/COFF: Fix import library's getNameType method. This expression to extract bits were simply wrong. I'm going to test this functionality from LLD. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241703 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Object/COFF.h b/include/llvm/Object/COFF.h index 451abf186af..025a9dbc6bc 100644 --- a/include/llvm/Object/COFF.h +++ b/include/llvm/Object/COFF.h @@ -474,7 +474,7 @@ struct coff_import_header { support::ulittle16_t OrdinalHint; support::ulittle16_t TypeInfo; int getType() const { return TypeInfo & 0x3; } - int getNameType() const { return (TypeInfo & 0x7) >> 2; } + int getNameType() const { return (TypeInfo >> 2) & 0x7; } }; struct coff_import_directory_table_entry {