aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/DataStructure/Local.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/DataStructure/Local.cpp')
-rw-r--r--lib/Analysis/DataStructure/Local.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index dbfbea3..c5c68b3 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -407,7 +407,7 @@ void GraphBuilder::visitGetElementPtrInst(User &GEP) {
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()) ||