remove a couple of asserts that use RTTI.
authorChris Lattner <sabre@nondot.org>
Thu, 21 Jan 2010 06:11:03 +0000 (06:11 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 21 Jan 2010 06:11:03 +0000 (06:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94068 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineFunction.h
include/llvm/CodeGen/MachineModuleInfo.h
include/llvm/Target/TargetMachine.h

index 32d2857f8743cbbab70ed085b04b54dfdc330f16..6ca51bfdf3d4fb0cc0b2d35380cb0d23cc69d3da 100644 (file)
@@ -175,9 +175,6 @@ public:
                                                       AlignOf<Ty>::Alignment));
         MFInfo = new (Loc) Ty(*this);
     }
-
-    assert((void*)dynamic_cast<Ty*>(MFInfo) == (void*)MFInfo &&
-           "Invalid concrete type or multiple inheritence for getInfo");
     return static_cast<Ty*>(MFInfo);
   }
 
index 192f37df2c0db0797d8d84bdee3e977e0ed5d3e4..1964625f3e6817711566d0c91d1350b0df9f24bb 100644 (file)
@@ -176,9 +176,6 @@ public:
   Ty &getObjFileInfo() {
     if (ObjFileMMI == 0)
       ObjFileMMI = new Ty(*this);
-    
-    assert((void*)dynamic_cast<Ty*>(ObjFileMMI) == (void*)ObjFileMMI &&
-           "Invalid concrete type or multiple inheritence for getInfo");
     return *static_cast<Ty*>(ObjFileMMI);
   }
   
index b0ed6b3aa79da59a1cf67523aba65d40207191ea..4db3d3ed30355c2160f7a10ab04c95e1f25e6118 100644 (file)
@@ -137,10 +137,7 @@ public:
   /// TargetSubtarget.  In debug builds, it verifies that the object being
   /// returned is of the correct type.
   template<typename STC> const STC &getSubtarget() const {
-    const TargetSubtarget *TST = getSubtargetImpl();
-    assert(TST && dynamic_cast<const STC*>(TST) &&
-           "Not the right kind of subtarget!");
-    return *static_cast<const STC*>(TST);
+    return *static_cast<const STC*>(getSubtargetImpl());
   }
 
   /// getRegisterInfo - If register information is available, return it.  If