diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-21 06:11:03 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-21 06:11:03 +0000 |
commit | 886e8762731e88bde5b656df61aa6cef9d4f308c (patch) | |
tree | 212275335d983834df93750008aa2f4a0278e378 | |
parent | 998977a1ed18ec9739484e2e031697d07d945d1d (diff) | |
download | external_llvm-886e8762731e88bde5b656df61aa6cef9d4f308c.tar.gz external_llvm-886e8762731e88bde5b656df61aa6cef9d4f308c.tar.bz2 external_llvm-886e8762731e88bde5b656df61aa6cef9d4f308c.zip |
remove a couple of asserts that use RTTI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94068 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 3 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineModuleInfo.h | 3 | ||||
-rw-r--r-- | include/llvm/Target/TargetMachine.h | 5 |
3 files changed, 1 insertions, 10 deletions
diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 32d2857f87..6ca51bfdf3 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -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); } diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index 192f37df2c..1964625f3e 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -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); } diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index b0ed6b3aa7..4db3d3ed30 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -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 |