[llvm-commits] [llvm] r94068 - in /llvm/trunk/include/llvm: CodeGen/MachineFunction.h CodeGen/MachineModuleInfo.h Target/TargetMachine.h

Chris Lattner sabre at nondot.org
Wed Jan 20 22:11:04 PST 2010


Author: lattner
Date: Thu Jan 21 00:11:03 2010
New Revision: 94068

URL: http://llvm.org/viewvc/llvm-project?rev=94068&view=rev
Log:
remove a couple of asserts that use RTTI.

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineFunction.h
    llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h
    llvm/trunk/include/llvm/Target/TargetMachine.h

Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=94068&r1=94067&r2=94068&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Thu Jan 21 00:11:03 2010
@@ -175,9 +175,6 @@
                                                       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);
   }
 

Modified: llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h?rev=94068&r1=94067&r2=94068&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineModuleInfo.h Thu Jan 21 00:11:03 2010
@@ -176,9 +176,6 @@
   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);
   }
   

Modified: llvm/trunk/include/llvm/Target/TargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=94068&r1=94067&r2=94068&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/TargetMachine.h (original)
+++ llvm/trunk/include/llvm/Target/TargetMachine.h Thu Jan 21 00:11:03 2010
@@ -137,10 +137,7 @@
   /// 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





More information about the llvm-commits mailing list