aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser/llvmAsmParser.y
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-07-23 15:30:06 +0000
committerChris Lattner <sabre@nondot.org>2003-07-23 15:30:06 +0000
commit949a3628024248db01d5b13e03c415e0c88e90e4 (patch)
tree20016aa1bfe0b2a217ac5c604879bee62f0321ea /lib/AsmParser/llvmAsmParser.y
parentc07736a397012499e337c994f7f952b07c709544 (diff)
downloadexternal_llvm-949a3628024248db01d5b13e03c415e0c88e90e4.zip
external_llvm-949a3628024248db01d5b13e03c415e0c88e90e4.tar.gz
external_llvm-949a3628024248db01d5b13e03c415e0c88e90e4.tar.bz2
Remove redundant const qualifiers from cast<> expressions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7253 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.y')
-rw-r--r--lib/AsmParser/llvmAsmParser.y20
1 files changed, 10 insertions, 10 deletions
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<const Type>(N);
+ return cast<Type>(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<const Type>(Existing)) {
+ if (const Type *Ty = dyn_cast<Type>(Existing)) {
if (const OpaqueType *OpTy = dyn_cast<OpaqueType>(Ty)) {
// We ARE replacing an opaque type!
((OpaqueType*)OpTy)->refineAbstractTypeTo(cast<Type>(V));
@@ -519,7 +519,7 @@ static bool setValueName(Value *V, char *NameStr) {
if (const Type *Ty = dyn_cast<Type>(Existing)) {
if (Ty == cast<Type>(V)) return true; // Yes, it's equal.
// std::cerr << "Type: " << Ty->getDescription() << " != "
- // << cast<const Type>(V)->getDescription() << "!\n";
+ // << cast<Type>(V)->getDescription() << "!\n";
} else if (const Constant *C = dyn_cast<Constant>(Existing)) {
if (C == V) return true; // Constants are equal to themselves
} else if (GlobalVariable *EGV = dyn_cast<GlobalVariable>(Existing)) {
@@ -875,7 +875,7 @@ ArgTypeListI : TypeListI
// ResolvedVal, ValueRef and ConstValueRef productions.
//
ConstVal: Types '[' ConstVector ']' { // Nonempty unsized arr
- const ArrayType *ATy = dyn_cast<const ArrayType>($1->get());
+ const ArrayType *ATy = dyn_cast<ArrayType>($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<const ArrayType>($1->get());
+ const ArrayType *ATy = dyn_cast<ArrayType>($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<const ArrayType>($1->get());
+ const ArrayType *ATy = dyn_cast<ArrayType>($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<const StructType>($1->get());
+ const StructType *STy = dyn_cast<StructType>($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<const StructType>($1->get());
+ const StructType *STy = dyn_cast<StructType>($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<const PointerType>($1->get());
+ const PointerType *PTy = dyn_cast<PointerType>($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<const PointerType>($1->get());
+ const PointerType *Ty = dyn_cast<PointerType>($1->get());
if (Ty == 0)
ThrowException("Global const reference must be a pointer type!");