comparison 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
comparison
equal deleted inserted replaced
95:71b8fecdae38 96:ce7ed8f59b99
45 uint, ;; Tag = 0 + LLVMDebugVersion 45 uint, ;; Tag = 0 + LLVMDebugVersion
46 uint ;; Tag of descriptors grouped by the anchor 46 uint ;; Tag of descriptors grouped by the anchor
47 } 47 }
48 */ 48 */
49 std::vector<const llvm::Type*> elems(2, Ty(Int32Ty)); 49 std::vector<const llvm::Type*> elems(2, Ty(Int32Ty));
50 const llvm::StructType* t = llvm::cast<llvm::StructType>(gIR->module->getTypeByName("llvm.dbg.anchor.type")); 50 const llvm::StructType* t = isaStruct(gIR->module->getTypeByName("llvm.dbg.anchor.type"));
51 51
52 /* 52 /*
53 %llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { uint 0, uint 17 } ;; DW_TAG_compile_unit 53 %llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { uint 0, uint 17 } ;; DW_TAG_compile_unit
54 %llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type { uint 0, uint 52 } ;; DW_TAG_variable 54 %llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type { uint 0, uint 52 } ;; DW_TAG_variable
55 %llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { uint 0, uint 46 } ;; DW_TAG_subprogram 55 %llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { uint 0, uint 46 } ;; DW_TAG_subprogram
99 } 99 }
100 100
101 ////////////////////////////////////////////////////////////////////////////////////////////////// 101 //////////////////////////////////////////////////////////////////////////////////////////////////
102 102
103 const llvm::StructType* GetDwarfCompileUnitType() { 103 const llvm::StructType* GetDwarfCompileUnitType() {
104 return llvm::cast<llvm::StructType>(gIR->module->getTypeByName("llvm.dbg.compile_unit.type")); 104 return isaStruct(gIR->module->getTypeByName("llvm.dbg.compile_unit.type"));
105 } 105 }
106 106
107 const llvm::StructType* GetDwarfSubProgramType() { 107 const llvm::StructType* GetDwarfSubProgramType() {
108 return llvm::cast<llvm::StructType>(gIR->module->getTypeByName("llvm.dbg.subprogram.type")); 108 return isaStruct(gIR->module->getTypeByName("llvm.dbg.subprogram.type"));
109 } 109 }
110 110
111 ////////////////////////////////////////////////////////////////////////////////////////////////// 111 //////////////////////////////////////////////////////////////////////////////////////////////////
112 112
113 llvm::GlobalVariable* DtoDwarfCompileUnit(Module* m, bool define) 113 llvm::GlobalVariable* DtoDwarfCompileUnit(Module* m, bool define)