aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorErick Tryzelaar <idadesub@users.sourceforge.net>2009-08-19 02:53:07 +0000
committerErick Tryzelaar <idadesub@users.sourceforge.net>2009-08-19 02:53:07 +0000
commita8f0bc04d33390d06115b80ad22a081598ba0fca (patch)
tree11ff5d7ac3275ab04c99f8dfc59f5c8fd24fdbcd /include
parent8481e3b368444386d5be5b74cd1e0ba6f858d983 (diff)
Fix gcc-4.4/fedora 11 by adding a sentinel value to SimpleValueType.
gcc-4.4 was optimizing away comparisons against SimpleValueType when it was compared to a value larger than the largest value in the enum. This patch works around it by adding one extra item to the enum so that these tests will now be valid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/ValueTypes.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h
index 4cdad67a73..978ea44f9d 100644
--- a/include/llvm/CodeGen/ValueTypes.h
+++ b/include/llvm/CodeGen/ValueTypes.h
@@ -111,7 +111,12 @@ namespace llvm {
iPTR = 255,
// LastSimpleValueType - The greatest valid SimpleValueType value.
- LastSimpleValueType = 255
+ LastSimpleValueType = 255,
+
+ // FirstExtendedValueType - This sentinel is needed so that gcc 4.4 won't
+ // optimize away checks of a SimpleValueType compared to
+ // LastSimpleValueType+1.
+ FirstExtendedValueType = 256
};
SimpleValueType SimpleTy;