summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit9eb4a5f4180fce83087833620cdb30abb3d9844e (patch)
tree5f944636ba0dcbc7e6bb456762b6dee6f87ae378 /llvm
parent583ef6214924b668372e08a59f0cfb419f8a510e (diff)
downloadbcm5719-llvm-9eb4a5f4180fce83087833620cdb30abb3d9844e.tar.gz
bcm5719-llvm-9eb4a5f4180fce83087833620cdb30abb3d9844e.zip
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. llvm-svn: 79401
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/CodeGen/ValueTypes.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/include/llvm/CodeGen/ValueTypes.h b/llvm/include/llvm/CodeGen/ValueTypes.h
index 4cdad67a736..978ea44f9d7 100644
--- a/llvm/include/llvm/CodeGen/ValueTypes.h
+++ b/llvm/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;
OpenPOWER on IntegriCloud