aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Cohen <jeffc@jolt-lang.org>2007-04-21 15:29:13 +0000
committerJeff Cohen <jeffc@jolt-lang.org>2007-04-21 15:29:13 +0000
commit8c28c467f6af0cff632f3f2251f2a42c548db437 (patch)
tree706e756f452bea81b8f88c26d15db051463ad63b
parent68c773cf193ceb5060b5130a64b43388b34b4ec9 (diff)
Fix breakage of bytecode reader when built with VC++.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36303 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/GlobalValue.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h
index 9dab3f82f0..ae122a90d7 100644
--- a/include/llvm/GlobalValue.h
+++ b/include/llvm/GlobalValue.h
@@ -55,8 +55,10 @@ protected:
}
Module *Parent;
- LinkageTypes Linkage : 4; // The linkage of this global
- VisibilityTypes Visibility : 1; // The visibility style of this global
+ // Note: VC++ treats enums as signed, so an extra bit is required to prevent
+ // Linkage and Visibility from turning into negative values.
+ LinkageTypes Linkage : 5; // The linkage of this global
+ VisibilityTypes Visibility : 2; // The visibility style of this global
unsigned Alignment : 16; // Alignment of this symbol, must be power of two
std::string Section; // Section to emit this into, empty mean default
public: