[llvm-commits] [SignlessTypes] CVS: llvm/lib/Analysis/DataStructure/Local.cpp

Reid Spencer reid at x10sys.com
Wed Oct 18 20:59:00 PDT 2006



Changes in directory llvm/lib/Analysis/DataStructure:

Local.cpp updated: 1.154 -> 1.154.2.1
---
Log message:

For PR950: http://llvm.org/PR950 :
This commit (on SignlessTypes branch) provides the first Iteration for 
moving LLVM away from Signed types. This patch removes the ConstantSInt
and ConstantUInt classes from Type.h and makes all necessary changes in
LLVM to compensate.


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

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


Index: llvm/lib/Analysis/DataStructure/Local.cpp
diff -u llvm/lib/Analysis/DataStructure/Local.cpp:1.154 llvm/lib/Analysis/DataStructure/Local.cpp:1.154.2.1
--- llvm/lib/Analysis/DataStructure/Local.cpp:1.154	Fri Oct 13 12:38:22 2006
+++ llvm/lib/Analysis/DataStructure/Local.cpp	Wed Oct 18 22:57:55 2006
@@ -407,7 +407,7 @@
        I != E; ++I)
     if (const StructType *STy = dyn_cast<StructType>(*I)) {
       unsigned FieldNo =
-           (unsigned)cast<ConstantUInt>(I.getOperand())->getValue();
+           (unsigned)cast<ConstantInt>(I.getOperand())->getZExtValue();
       Offset += (unsigned)TD.getStructLayout(STy)->MemberOffsets[FieldNo];
     } else if (const PointerType *PTy = dyn_cast<PointerType>(*I)) {
       if (!isa<Constant>(I.getOperand()) ||






More information about the llvm-commits mailing list