[llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp

Reid Spencer reid at x10sys.com
Mon Mar 19 13:39:30 PDT 2007



Changes in directory llvm/lib/VMCore:

Constants.cpp updated: 1.227 -> 1.228
---
Log message:

Allow ConstantInt::get(Ty, uint64_t) to interpret the 64-bit values as a
negative number. This is needed to fix test/Assembler/2007-03-19-NegValue.ll


---
Diffs of the changes:  (+2 -2)

 Constants.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.227 llvm/lib/VMCore/Constants.cpp:1.228
--- llvm/lib/VMCore/Constants.cpp:1.227	Wed Mar  7 18:59:12 2007
+++ llvm/lib/VMCore/Constants.cpp	Mon Mar 19 15:39:08 2007
@@ -203,9 +203,9 @@
                  DenseMapAPIntKeyInfo> IntMapTy;
 static ManagedStatic<IntMapTy> IntConstants;
 
-ConstantInt *ConstantInt::get(const Type *Ty, uint64_t V) {
+ConstantInt *ConstantInt::get(const Type *Ty, uint64_t V, bool isSigned) {
   const IntegerType *ITy = cast<IntegerType>(Ty);
-  return get(APInt(ITy->getBitWidth(), V));
+  return get(APInt(ITy->getBitWidth(), V, isSigned));
 }
 
 // Get a ConstantInt from an APInt. Note that the value stored in the DenseMap 






More information about the llvm-commits mailing list