From 949a3628024248db01d5b13e03c415e0c88e90e4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 23 Jul 2003 15:30:06 +0000 Subject: Remove redundant const qualifiers from cast<> expressions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7253 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AsmParser/llvmAsmParser.y | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'lib/AsmParser/llvmAsmParser.y') diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index ae394df..a06a4b7 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -242,7 +242,7 @@ static const Type *getTypeVal(const ValID &D, bool DoNotImprovise = false) { } D.destroy(); // Free old strdup'd memory... - return cast(N); + return cast(N); } default: ThrowException("Internal parser error: Invalid symbol type reference!"); @@ -506,7 +506,7 @@ static bool setValueName(Value *V, char *NameStr) { if (Existing) { // Inserting a name that is already defined??? // There is only one case where this is allowed: when we are refining an // opaque type. In this case, Existing will be an opaque type. - if (const Type *Ty = dyn_cast(Existing)) { + if (const Type *Ty = dyn_cast(Existing)) { if (const OpaqueType *OpTy = dyn_cast(Ty)) { // We ARE replacing an opaque type! ((OpaqueType*)OpTy)->refineAbstractTypeTo(cast(V)); @@ -519,7 +519,7 @@ static bool setValueName(Value *V, char *NameStr) { if (const Type *Ty = dyn_cast(Existing)) { if (Ty == cast(V)) return true; // Yes, it's equal. // std::cerr << "Type: " << Ty->getDescription() << " != " - // << cast(V)->getDescription() << "!\n"; + // << cast(V)->getDescription() << "!\n"; } else if (const Constant *C = dyn_cast(Existing)) { if (C == V) return true; // Constants are equal to themselves } else if (GlobalVariable *EGV = dyn_cast(Existing)) { @@ -875,7 +875,7 @@ ArgTypeListI : TypeListI // ResolvedVal, ValueRef and ConstValueRef productions. // ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr - const ArrayType *ATy = dyn_cast($1->get()); + const ArrayType *ATy = dyn_cast($1->get()); if (ATy == 0) ThrowException("Cannot make array constant with type: '" + (*$1)->getDescription() + "'!"); @@ -900,7 +900,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr delete $1; delete $3; } | Types '[' ']' { - const ArrayType *ATy = dyn_cast($1->get()); + const ArrayType *ATy = dyn_cast($1->get()); if (ATy == 0) ThrowException("Cannot make array constant with type: '" + (*$1)->getDescription() + "'!"); @@ -913,7 +913,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr delete $1; } | Types 'c' STRINGCONSTANT { - const ArrayType *ATy = dyn_cast($1->get()); + const ArrayType *ATy = dyn_cast($1->get()); if (ATy == 0) ThrowException("Cannot make array constant with type: '" + (*$1)->getDescription() + "'!"); @@ -941,7 +941,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr delete $1; } | Types '{' ConstVector '}' { - const StructType *STy = dyn_cast($1->get()); + const StructType *STy = dyn_cast($1->get()); if (STy == 0) ThrowException("Cannot make struct constant with type: '" + (*$1)->getDescription() + "'!"); @@ -961,7 +961,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr delete $1; delete $3; } | Types '{' '}' { - const StructType *STy = dyn_cast($1->get()); + const StructType *STy = dyn_cast($1->get()); if (STy == 0) ThrowException("Cannot make struct constant with type: '" + (*$1)->getDescription() + "'!"); @@ -973,7 +973,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr delete $1; } | Types NULL_TOK { - const PointerType *PTy = dyn_cast($1->get()); + const PointerType *PTy = dyn_cast($1->get()); if (PTy == 0) ThrowException("Cannot make null pointer constant with type: '" + (*$1)->getDescription() + "'!"); @@ -982,7 +982,7 @@ ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr delete $1; } | Types SymbolicValueRef { - const PointerType *Ty = dyn_cast($1->get()); + const PointerType *Ty = dyn_cast($1->get()); if (Ty == 0) ThrowException("Global const reference must be a pointer type!"); -- cgit v1.1