[cfe-commits] r68764 - /cfe/trunk/lib/CodeGen/CGExprConstant.cpp

Anders Carlsson andersca at mac.com
Thu Apr 9 21:59:59 PDT 2009


Author: andersca
Date: Thu Apr  9 23:59:59 2009
New Revision: 68764

URL: http://llvm.org/viewvc/llvm-project?rev=68764&view=rev
Log:
Rename variables to avoid conflict.

Modified:
    cfe/trunk/lib/CodeGen/CGExprConstant.cpp

Modified: cfe/trunk/lib/CodeGen/CGExprConstant.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprConstant.cpp?rev=68764&r1=68763&r2=68764&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprConstant.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprConstant.cpp Thu Apr  9 23:59:59 2009
@@ -482,7 +482,7 @@
       assert(0 && "Constant expressions should be initialized.");
       return 0;
     case APValue::LValue: {
-      const llvm::Type *DestType = getTypes().ConvertTypeForMem(E->getType());
+      const llvm::Type *DestTy = getTypes().ConvertTypeForMem(E->getType());
       llvm::Constant *Offset = 
         llvm::ConstantInt::get(llvm::Type::Int64Ty, 
                                Result.Val.getLValueOffset());
@@ -502,21 +502,21 @@
 
         // Convert to the appropriate type; this could be an lvalue for
         // an integer.
-        if (isa<llvm::PointerType>(DestType))
-          return llvm::ConstantExpr::getBitCast(C, DestType);
+        if (isa<llvm::PointerType>(DestTy))
+          return llvm::ConstantExpr::getBitCast(C, DestTy);
 
-        return llvm::ConstantExpr::getPtrToInt(C, DestType);
+        return llvm::ConstantExpr::getPtrToInt(C, DestTy);
       } else {
         C = Offset;
 
         // Convert to the appropriate type; this could be an lvalue for
         // an integer.
-        if (isa<llvm::PointerType>(DestType))
-          return llvm::ConstantExpr::getIntToPtr(C, DestType);
+        if (isa<llvm::PointerType>(DestTy))
+          return llvm::ConstantExpr::getIntToPtr(C, DestTy);
 
         // If the types don't match this should only be a truncate.
-        if (C->getType() != DestType)
-          return llvm::ConstantExpr::getTrunc(C, DestType);
+        if (C->getType() != DestTy)
+          return llvm::ConstantExpr::getTrunc(C, DestTy);
 
         return C;
       }





More information about the cfe-commits mailing list