diff gen/todebug.cpp @ 96:ce7ed8f59b99 trunk

[svn r100] Moved test/ray.d to demos/ray.d. Cleanups.
author lindquist
date Mon, 12 Nov 2007 07:58:44 +0100
parents 61615fa85940
children 5825d48b27d1
line wrap: on
line diff
--- a/gen/todebug.cpp	Mon Nov 12 06:43:33 2007 +0100
+++ b/gen/todebug.cpp	Mon Nov 12 07:58:44 2007 +0100
@@ -47,7 +47,7 @@
     }
     */
     std::vector<const llvm::Type*> elems(2, Ty(Int32Ty));
-    const llvm::StructType* t = llvm::cast<llvm::StructType>(gIR->module->getTypeByName("llvm.dbg.anchor.type"));
+    const llvm::StructType* t = isaStruct(gIR->module->getTypeByName("llvm.dbg.anchor.type"));
 
     /*
     %llvm.dbg.compile_units       = linkonce constant %llvm.dbg.anchor.type  { uint 0, uint 17 } ;; DW_TAG_compile_unit
@@ -101,11 +101,11 @@
 //////////////////////////////////////////////////////////////////////////////////////////////////
 
 const llvm::StructType* GetDwarfCompileUnitType() {
-    return llvm::cast<llvm::StructType>(gIR->module->getTypeByName("llvm.dbg.compile_unit.type"));
+    return isaStruct(gIR->module->getTypeByName("llvm.dbg.compile_unit.type"));
 }
 
 const llvm::StructType* GetDwarfSubProgramType() {
-    return llvm::cast<llvm::StructType>(gIR->module->getTypeByName("llvm.dbg.subprogram.type"));
+    return isaStruct(gIR->module->getTypeByName("llvm.dbg.subprogram.type"));
 }
 
 //////////////////////////////////////////////////////////////////////////////////////////////////