Destroy allocated resources on exception.
[oota-llvm.git] / lib / VMCore / SlotCalculator.cpp
index c9560c1d8c2fb9d7cfebd46d825fa8f0aa0e71b6..005c5c1658de9666464d3eff4c3b5205e4d8f133 100644 (file)
@@ -262,7 +262,7 @@ int SlotCalculator::insertVal(const Value *D, bool dontIgnore) {
     }
 
   // If it's a type, make sure that all subtypes of the type are included...
-  if (const Type *TheTy = dyn_cast<const Type>(D)) {
+  if (const Type *TheTy = dyn_cast<Type>(D)) {
 
     // Insert the current type before any subtypes.  This is important because
     // recursive types elements are inserted in a bottom up order.  Changing