aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ConstantFold.cpp
diff options
context:
space:
mode:
authorManuel Jacob <me@manueljacob.de>2016-01-19 15:21:15 +0000
committerManuel Jacob <me@manueljacob.de>2016-01-19 15:21:15 +0000
commit6a4761e384427ad9a12200cfc1a5245b49ee207f (patch)
tree9dadca4e446ab59925b6fea9e14f4a08add8f623 /llvm/lib/IR/ConstantFold.cpp
parent5568c83a60e0168780565db65c70d7a07600ef67 (diff)
downloadllvm-6a4761e384427ad9a12200cfc1a5245b49ee207f.zip
llvm-6a4761e384427ad9a12200cfc1a5245b49ee207f.tar.gz
llvm-6a4761e384427ad9a12200cfc1a5245b49ee207f.tar.bz2
Rename Variable `Ptr` to `PtrTy`. NFC.
llvm-svn: 258130
Diffstat (limited to 'llvm/lib/IR/ConstantFold.cpp')
-rw-r--r--llvm/lib/IR/ConstantFold.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/IR/ConstantFold.cpp b/llvm/lib/IR/ConstantFold.cpp
index ce3fe03..3585586 100644
--- a/llvm/lib/IR/ConstantFold.cpp
+++ b/llvm/lib/IR/ConstantFold.cpp
@@ -2040,11 +2040,11 @@ static Constant *ConstantFoldGetElementPtrImpl(Type *PointeeTy, Constant *C,
return C;
if (isa<UndefValue>(C)) {
- PointerType *Ptr = cast<PointerType>(C->getType());
+ PointerType *PtrTy = cast<PointerType>(C->getType());
Type *Ty = GetElementPtrInst::getIndexedType(
- cast<PointerType>(Ptr->getScalarType())->getElementType(), Idxs);
+ cast<PointerType>(PtrTy->getScalarType())->getElementType(), Idxs);
assert(Ty && "Invalid indices for GEP!");
- return UndefValue::get(PointerType::get(Ty, Ptr->getAddressSpace()));
+ return UndefValue::get(PointerType::get(Ty, PtrTy->getAddressSpace()));
}
if (C->isNullValue()) {
@@ -2055,12 +2055,12 @@ static Constant *ConstantFoldGetElementPtrImpl(Type *PointeeTy, Constant *C,
break;
}
if (isNull) {
- PointerType *Ptr = cast<PointerType>(C->getType());
+ PointerType *PtrTy = cast<PointerType>(C->getType());
Type *Ty = GetElementPtrInst::getIndexedType(
- cast<PointerType>(Ptr->getScalarType())->getElementType(), Idxs);
+ cast<PointerType>(PtrTy->getScalarType())->getElementType(), Idxs);
assert(Ty && "Invalid indices for GEP!");
return ConstantPointerNull::get(PointerType::get(Ty,
- Ptr->getAddressSpace()));
+ PtrTy->getAddressSpace()));
}
}