From 71abaab1d2379aca3a2bd9d213d047cdb235349e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 7 Oct 2005 05:23:36 +0000 Subject: [PATCH] add a hack to work around broken VC++ scoping rules. Thx to JeffC for pointing this out to me git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23655 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/Constants.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 352e963eb44..080baf8d63b 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -250,12 +250,12 @@ ConstantArray::ConstantArray(const ArrayType *T, Use *OL = OperandList; for (std::vector::const_iterator I = V.begin(), E = V.end(); I != E; ++I, ++OL) { - Constant *E = *I; - assert((E->getType() == T->getElementType() || + Constant *C = *I; + assert((C->getType() == T->getElementType() || (T->isAbstract() && - E->getType()->getTypeID() == T->getElementType()->getTypeID())) && + C->getType()->getTypeID() == T->getElementType()->getTypeID())) && "Initializer for array element doesn't match array element type!"); - OL->init(E, this); + OL->init(C, this); } } @@ -271,14 +271,14 @@ ConstantStruct::ConstantStruct(const StructType *T, Use *OL = OperandList; for (std::vector::const_iterator I = V.begin(), E = V.end(); I != E; ++I, ++OL) { - Constant *E = *I; - assert((E->getType() == T->getElementType(I-V.begin()) || + Constant *C = *I; + assert((C->getType() == T->getElementType(I-V.begin()) || ((T->getElementType(I-V.begin())->isAbstract() || - E->getType()->isAbstract()) && + C->getType()->isAbstract()) && T->getElementType(I-V.begin())->getTypeID() == - E->getType()->getTypeID())) && + C->getType()->getTypeID())) && "Initializer for struct element doesn't match struct element type!"); - OL->init(E, this); + OL->init(C, this); } } @@ -293,12 +293,12 @@ ConstantPacked::ConstantPacked(const PackedType *T, Use *OL = OperandList; for (std::vector::const_iterator I = V.begin(), E = V.end(); I != E; ++I, ++OL) { - Constant *E = *I; - assert((E->getType() == T->getElementType() || + Constant *C = *I; + assert((C->getType() == T->getElementType() || (T->isAbstract() && - E->getType()->getTypeID() == T->getElementType()->getTypeID())) && + C->getType()->getTypeID() == T->getElementType()->getTypeID())) && "Initializer for packed element doesn't match packed element type!"); - OL->init(E, this); + OL->init(C, this); } }