[llvm-commits] CVS: llvm/include/llvm/Support/ConstantRange.h PatternMatch.h

Zhou Sheng zhousheng00 at gmail.com
Thu Jan 11 04:25:02 PST 2007



Changes in directory llvm/include/llvm/Support:

ConstantRange.h updated: 1.13 -> 1.14
PatternMatch.h updated: 1.15 -> 1.16
---
Log message:

For PR1043: http://llvm.org/PR1043 :
Merge ConstantIntegral and ConstantBool into ConstantInt.
Remove ConstantIntegral and ConstantBool from LLVM.


---
Diffs of the changes:  (+7 -8)

 ConstantRange.h |   11 +++++------
 PatternMatch.h  |    4 ++--
 2 files changed, 7 insertions(+), 8 deletions(-)


Index: llvm/include/llvm/Support/ConstantRange.h
diff -u llvm/include/llvm/Support/ConstantRange.h:1.13 llvm/include/llvm/Support/ConstantRange.h:1.14
--- llvm/include/llvm/Support/ConstantRange.h:1.13	Sat Dec 23 00:05:40 2006
+++ llvm/include/llvm/Support/ConstantRange.h	Thu Jan 11 06:24:13 2007
@@ -36,12 +36,11 @@
 
 namespace llvm {
 class Constant;
-class ConstantIntegral;
 class ConstantInt;
 class Type;
 
 class ConstantRange {
-  ConstantIntegral *Lower, *Upper;
+  ConstantInt *Lower, *Upper;
  public:
   /// Initialize a full (the default) or empty set for the specified type.
   ///
@@ -61,15 +60,15 @@
   /// predicate should be either an ICmpInst::Predicate or FCmpInst::Predicate
   /// value.
   /// @brief Get a range for a relation with a constant integral.
-  ConstantRange(unsigned short predicate, ConstantIntegral *C);
+  ConstantRange(unsigned short predicate, ConstantInt *C);
 
   /// getLower - Return the lower value for this range...
   ///
-  ConstantIntegral *getLower() const { return Lower; }
+  ConstantInt *getLower() const { return Lower; }
 
   /// getUpper - Return the upper value for this range...
   ///
-  ConstantIntegral *getUpper() const { return Upper; }
+  ConstantInt *getUpper() const { return Upper; }
 
   /// getType - Return the LLVM data type of this range.
   ///
@@ -98,7 +97,7 @@
   /// getSingleElement - If this set contains a single element, return it,
   /// otherwise return null.
   ///
-  ConstantIntegral *getSingleElement() const;
+  ConstantInt *getSingleElement() const;
 
   /// isSingleElement - Return true if this set contains exactly one member.
   ///


Index: llvm/include/llvm/Support/PatternMatch.h
diff -u llvm/include/llvm/Support/PatternMatch.h:1.15 llvm/include/llvm/Support/PatternMatch.h:1.16
--- llvm/include/llvm/Support/PatternMatch.h:1.15	Sat Dec 23 00:05:40 2006
+++ llvm/include/llvm/Support/PatternMatch.h	Thu Jan 11 06:24:13 2007
@@ -356,9 +356,9 @@
   }
 private:
   bool matchIfNot(Value *LHS, Value *RHS) {
-    if (ConstantIntegral *CI = dyn_cast<ConstantIntegral>(RHS))
+    if (ConstantInt *CI = dyn_cast<ConstantInt>(RHS))
       return CI->isAllOnesValue() && L.match(LHS);
-    else if (ConstantIntegral *CI = dyn_cast<ConstantIntegral>(LHS))
+    else if (ConstantInt *CI = dyn_cast<ConstantInt>(LHS))
       return CI->isAllOnesValue() && L.match(RHS);
     return false;
   }






More information about the llvm-commits mailing list