comparison gen/todebug.h @ 1650:40bd4a0d4870

Update to work with LLVM 2.7. Removed use of dyn_cast, llvm no compiles without exceptions and rtti by default. We do need exceptions for the libconfig stuff, but rtti isn't necessary (anymore). Debug info needs to be rewritten, as in LLVM 2.7 the format has completely changed. To have something to look at while rewriting, the old code has been wrapped inside #ifndef DISABLE_DEBUG_INFO , this means that you have to define this to compile at the moment. Updated tango 0.99.9 patch to include updated EH runtime code, which is needed for LLVM 2.7 as well.
author Tomas Lindquist Olsen
date Wed, 19 May 2010 12:42:32 +0200
parents 1714836f2c0b
children
comparison
equal deleted inserted replaced
1649:36da40ecbbe0 1650:40bd4a0d4870
1 #ifndef LDC_GEN_TODEBUG_H 1 #ifndef LDC_GEN_TODEBUG_H
2 #define LDC_GEN_TODEBUG_H 2 #define LDC_GEN_TODEBUG_H
3
4 #ifndef DISABLE_DEBUG_INFO
3 5
4 void RegisterDwarfSymbols(llvm::Module* mod); 6 void RegisterDwarfSymbols(llvm::Module* mod);
5 7
6 /** 8 /**
7 * Emit the Dwarf compile_unit global for a Module m. 9 * Emit the Dwarf compile_unit global for a Module m.
17 */ 19 */
18 llvm::DISubprogram DtoDwarfSubProgram(FuncDeclaration* fd); 20 llvm::DISubprogram DtoDwarfSubProgram(FuncDeclaration* fd);
19 21
20 /** 22 /**
21 * Emit the Dwarf subprogram global for a internal function. 23 * Emit the Dwarf subprogram global for a internal function.
22 * This is used for generated functions like moduleinfoctors, 24 * This is used for generated functions like moduleinfoctors,
23 * module ctors/dtors and unittests. 25 * module ctors/dtors and unittests.
24 * @return the Dwarf subprogram global. 26 * @return the Dwarf subprogram global.
25 */ 27 */
26 llvm::DISubprogram DtoDwarfSubProgramInternal(const char* prettyname, const char* mangledname); 28 llvm::DISubprogram DtoDwarfSubProgramInternal(const char* prettyname, const char* mangledname);
27 29
37 */ 39 */
38 void DtoDwarfLocalVariable(LLValue* ll, VarDeclaration* vd); 40 void DtoDwarfLocalVariable(LLValue* ll, VarDeclaration* vd);
39 41
40 /** 42 /**
41 * Emits all things necessary for making debug info for a global variable vd. 43 * Emits all things necessary for making debug info for a global variable vd.
42 * @param ll 44 * @param ll
43 * @param vd 45 * @param vd
44 * @return 46 * @return
45 */ 47 */
46 llvm::DIGlobalVariable DtoDwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd); 48 llvm::DIGlobalVariable DtoDwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd);
47 49
50 #endif // DISABLE_DEBUG_INFO
51
48 #endif // LDC_GEN_TODEBUG_H 52 #endif // LDC_GEN_TODEBUG_H
49
50