[llvm-commits] [llvm-gcc-4.2] r111694 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
Eric Christopher
echristo at apple.com
Fri Aug 20 16:08:36 PDT 2010
Author: echristo
Date: Fri Aug 20 18:08:36 2010
New Revision: 111694
URL: http://llvm.org/viewvc/llvm-project?rev=111694&view=rev
Log:
Fix redefinition of Ty per C++ [stmt.select] p3.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=111694&r1=111693&r2=111694&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Fri Aug 20 18:08:36 2010
@@ -790,18 +790,18 @@
case POINTER_TYPE:
case REFERENCE_TYPE:
case BLOCK_POINTER_TYPE:
- if (const PointerType *Ty = cast_or_null<PointerType>(GET_TYPE_LLVM(type))){
+ if (const PointerType *PTy = cast_or_null<PointerType>(GET_TYPE_LLVM(type))){
// We already converted this type. If this isn't a case where we have to
// reparse it, just return it.
if (PointersToReresolve.empty() || PointersToReresolve.back() != type ||
ConvertingStruct)
- return Ty;
+ return PTy;
// Okay, we know that we're !ConvertingStruct and that type is on the end
// of the vector. Remove this entry from the PointersToReresolve list and
// get the pointee type. Note that this order is important in case the
// pointee type uses this pointer.
- assert(Ty->getElementType()->isOpaqueTy() && "Not a deferred ref!");
+ assert(PTy->getElementType()->isOpaqueTy() && "Not a deferred ref!");
// We are actively resolving this pointer. We want to pop this value from
// the stack, as we are no longer resolving it. However, we don't want to
@@ -816,7 +816,7 @@
// Note that we know that Ty cannot be resolved or invalidated here.
const Type *Actual = ConvertType(TREE_TYPE(type));
- assert(GET_TYPE_LLVM(type) == Ty && "Pointer invalidated!");
+ assert(GET_TYPE_LLVM(type) == PTy && "Pointer invalidated!");
// Restore ConvertingStruct for the caller.
ConvertingStruct = false;
@@ -825,7 +825,7 @@
Actual = Type::getInt8Ty(Context); // void* -> sbyte*
// Update the type, potentially updating TYPE_LLVM(type).
- const OpaqueType *OT = cast<OpaqueType>(Ty->getElementType());
+ const OpaqueType *OT = cast<OpaqueType>(PTy->getElementType());
const_cast<OpaqueType*>(OT)->refineAbstractTypeTo(Actual);
return GET_TYPE_LLVM(type);
} else {
More information about the llvm-commits
mailing list