From 1548b863ce316c0b3be81d50d6388147df9aba72 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 21 Jan 2010 06:11:03 +0000 Subject: [PATCH] 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 --- include/llvm/CodeGen/MachineFunction.h | 3 --- include/llvm/CodeGen/MachineModuleInfo.h | 3 --- include/llvm/Target/TargetMachine.h | 5 +---- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 32d2857f874..6ca51bfdf3d 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -175,9 +175,6 @@ public: AlignOf::Alignment)); MFInfo = new (Loc) Ty(*this); } - - assert((void*)dynamic_cast(MFInfo) == (void*)MFInfo && - "Invalid concrete type or multiple inheritence for getInfo"); return static_cast(MFInfo); } diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index 192f37df2c0..1964625f3e6 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(ObjFileMMI) == (void*)ObjFileMMI && - "Invalid concrete type or multiple inheritence for getInfo"); return *static_cast(ObjFileMMI); } diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index b0ed6b3aa79..4db3d3ed303 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 const STC &getSubtarget() const { - const TargetSubtarget *TST = getSubtargetImpl(); - assert(TST && dynamic_cast(TST) && - "Not the right kind of subtarget!"); - return *static_cast(TST); + return *static_cast(getSubtargetImpl()); } /// getRegisterInfo - If register information is available, return it. If -- 2.11.0