From dea5078cdede46d1e7213fee40fcdd7d245b82dd Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 8 Jun 2015 22:12:44 +0000 Subject: [PATCH] [MC] Use unsigned for the Kind bitfield in MCSymbol Fixes most of the test suite on Windows with clang-cl. I'm not sure why the test suite was passing with MSVC 2013. Maybe they changed their behavior and we are emulating their old sign extension behavior. I think this deserves more investigation, but I want to green the bot first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239357 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/MC/MCSymbol.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/llvm/MC/MCSymbol.h b/include/llvm/MC/MCSymbol.h index 9875d4a3fa4..3f69bc99f3b 100644 --- a/include/llvm/MC/MCSymbol.h +++ b/include/llvm/MC/MCSymbol.h @@ -90,7 +90,9 @@ protected: /// This symbol is private extern. mutable unsigned IsPrivateExtern : 1; - SymbolKind Kind : 2; + /// LLVM RTTI discriminator. This is actually a SymbolKind enumerator, but is + /// unsigned to avoid sign extension and achieve better bitpacking with MSVC. + unsigned Kind : 2; /// Index field, for use by the object file implementation. mutable uint32_t Index = 0; -- 2.34.1