Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

root/gen/todebug.h

Revision 1650:40bd4a0d4870, 1.4 kB (checked in by Tomas Lindquist Olsen, 2 years ago)

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.

Line 
1 #ifndef LDC_GEN_TODEBUG_H
2 #define LDC_GEN_TODEBUG_H
3
4 #ifndef DISABLE_DEBUG_INFO
5
6 void RegisterDwarfSymbols(llvm::Module* mod);
7
8 /**
9  * Emit the Dwarf compile_unit global for a Module m.
10  * @param m
11  * @return the Dwarf compile_unit.
12  */
13 llvm::DICompileUnit DtoDwarfCompileUnit(Module* m);
14
15 /**
16  * Emit the Dwarf subprogram global for a function declaration fd.
17  * @param fd
18  * @return the Dwarf subprogram global.
19  */
20 llvm::DISubprogram DtoDwarfSubProgram(FuncDeclaration* fd);
21
22 /**
23  * Emit the Dwarf subprogram global for a internal function.
24  * This is used for generated functions like moduleinfoctors,
25  * module ctors/dtors and unittests.
26  * @return the Dwarf subprogram global.
27  */
28 llvm::DISubprogram DtoDwarfSubProgramInternal(const char* prettyname, const char* mangledname);
29
30 void DtoDwarfFuncStart(FuncDeclaration* fd);
31 void DtoDwarfFuncEnd(FuncDeclaration* fd);
32
33 void DtoDwarfStopPoint(unsigned ln);
34
35 /**
36  * Emits all things necessary for making debug info for a local variable vd.
37  * @param ll LLVM Value of the variable.
38  * @param vd Variable declaration to emit debug info for.
39  */
40 void DtoDwarfLocalVariable(LLValue* ll, VarDeclaration* vd);
41
42 /**
43  * Emits all things necessary for making debug info for a global variable vd.
44  * @param ll
45  * @param vd
46  * @return
47  */
48 llvm::DIGlobalVariable DtoDwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd);
49
50 #endif // DISABLE_DEBUG_INFO
51
52 #endif // LDC_GEN_TODEBUG_H
Note: See TracBrowser for help on using the browser.
Copyright © 2008, LDC Development Team.