[llvm-commits] [SignlessTypes] CVS: llvm/lib/Target/CBackend/Writer.cpp

Reid Spencer reid at x10sys.com
Thu Oct 19 17:35:17 PDT 2006



Changes in directory llvm/lib/Target/CBackend:

Writer.cpp updated: 1.272.2.1 -> 1.272.2.2
---
Log message:

Make some simplifications for ConstantInt:
1. Get rid of getRawValue, replace with getZExtValue
2. Single constructor (uint64_t) and get method (int64_t)
3. Canonicalize the constant to a zero extended unsigned 64-bit integer when
   it is created.
4. Adjust getZExtValue() to be a do-nothing (just returns the already
   canonicalized value).
5. Compensate for above changes everywhere else.


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

 Writer.cpp |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.272.2.1 llvm/lib/Target/CBackend/Writer.cpp:1.272.2.2
--- llvm/lib/Target/CBackend/Writer.cpp:1.272.2.1	Wed Oct 18 22:57:56 2006
+++ llvm/lib/Target/CBackend/Writer.cpp	Thu Oct 19 19:34:44 2006
@@ -460,7 +460,7 @@
 
     // Do not include the last character, which we know is null
     for (unsigned i = 0, e = CPA->getNumOperands()-1; i != e; ++i) {
-      unsigned char C = cast<ConstantInt>(CPA->getOperand(i))->getRawValue();
+      unsigned char C = cast<ConstantInt>(CPA->getOperand(i))->getZExtValue();
 
       // Print it out literally if it is a printable character.  The only thing
       // to be careful about is when the last letter output was a hex escape






More information about the llvm-commits mailing list