Fix const correctness
authorChris Lattner <sabre@nondot.org>
Tue, 25 Nov 2003 21:28:00 +0000 (21:28 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 25 Nov 2003 21:28:00 +0000 (21:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10229 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Type.cpp

index 3c2fd8ca47ff8f3692ca3663d74948b0c04d2613..9925a54d68840762dc3a6ee334a510b5566c4d1b 100644 (file)
@@ -262,7 +262,7 @@ const std::string &Type::getDescription() const {
 
 bool StructType::indexValid(const Value *V) const {
   // Structure indexes require unsigned integer constants.
-  if (ConstantUInt *CU = dyn_cast<ConstantUInt>(V))
+  if (const ConstantUInt *CU = dyn_cast<ConstantUInt>(V))
     return CU->getValue() < ETypes.size();
   return false;
 }