[llvm] r258130 - Rename Variable `Ptr` to `PtrTy`. NFC.

Manuel Jacob via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 19 07:21:15 PST 2016


Author: mjacob
Date: Tue Jan 19 09:21:15 2016
New Revision: 258130

URL: http://llvm.org/viewvc/llvm-project?rev=258130&view=rev
Log:
Rename Variable `Ptr` to `PtrTy`.  NFC.

Modified:
    llvm/trunk/lib/IR/ConstantFold.cpp

Modified: llvm/trunk/lib/IR/ConstantFold.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/ConstantFold.cpp?rev=258130&r1=258129&r2=258130&view=diff
==============================================================================
--- llvm/trunk/lib/IR/ConstantFold.cpp (original)
+++ llvm/trunk/lib/IR/ConstantFold.cpp Tue Jan 19 09:21:15 2016
@@ -2040,11 +2040,11 @@ static Constant *ConstantFoldGetElementP
     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 *ConstantFoldGetElementP
         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()));
     }
   }
 




More information about the llvm-commits mailing list