annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
664
eef8ac26c66c Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents: 250
diff changeset
1 #ifndef LDC_GEN_TODEBUG_H
eef8ac26c66c Some missed LLVMDC -> LDC.
Christian Kamm <kamm incasoftware de>
parents: 250
diff changeset
2 #define LDC_GEN_TODEBUG_H
82
d8dd47ef3973 [svn r86] Changed the way arguments are given storage. It is now detected if they will need it during semantic passes.
lindquist
parents:
diff changeset
3
1650
40bd4a0d4870 Update to work with LLVM 2.7.
Tomas Lindquist Olsen
parents: 946
diff changeset
4 #ifndef DISABLE_DEBUG_INFO
40bd4a0d4870 Update to work with LLVM 2.7.
Tomas Lindquist Olsen
parents: 946
diff changeset
5
82
d8dd47ef3973 [svn r86] Changed the way arguments are given storage. It is now detected if they will need it during semantic passes.
lindquist
parents:
diff changeset
6 void RegisterDwarfSymbols(llvm::Module* mod);
d8dd47ef3973 [svn r86] Changed the way arguments are given storage. It is now detected if they will need it during semantic passes.
lindquist
parents:
diff changeset
7
250
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 247
diff changeset
8 /**
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 247
diff changeset
9 * Emit the Dwarf compile_unit global for a Module m.
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 247
diff changeset
10 * @param m
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 247
diff changeset
11 * @return the Dwarf compile_unit.
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 247
diff changeset
12 */
946
1714836f2c0b Mostly rewrite debug info generation in terms of llvm/Analysis/DebugInfo.h.
Christian Kamm <kamm incasoftware de>
parents: 686
diff changeset
13 llvm::DICompileUnit DtoDwarfCompileUnit(Module* m);
250
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 247
diff changeset
14
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 247
diff changeset
15 /**
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 247
diff changeset
16 * Emit the Dwarf subprogram global for a function declaration fd.
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 247
diff changeset
17 * @param fd
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 247
diff changeset
18 * @return the Dwarf subprogram global.
fc9c1a0eabbd [svn r267] Fixed debug info for global variables.
lindquist
parents: 247
diff changeset
19 */
946
1714836f2c0b Mostly rewrite debug info generation in terms of llvm/Analysis/DebugInfo.h.
Christian Kamm <kamm incasoftware de>
parents: 686
diff changeset
20 llvm::DISubprogram DtoDwarfSubProgram(FuncDeclaration* fd);
82
d8dd47ef3973 [svn r86] Changed the way arguments are given storage. It is now detected if they will need it during semantic passes.
lindquist
parents:
diff changeset
21
686
363bb6c0cc80 Emit stub debug info for generated functions to work around LLVM bug 2172.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
22 /**
363bb6c0cc80 Emit stub debug info for generated functions to work around LLVM bug 2172.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
23 * Emit the Dwarf subprogram global for a internal function.
1650
40bd4a0d4870 Update to work with LLVM 2.7.
Tomas Lindquist Olsen
parents: 946
diff changeset
24 * This is used for generated functions like moduleinfoctors,
686
363bb6c0cc80 Emit stub debug info for generated functions to work around LLVM bug 2172.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
25 * module ctors/dtors and unittests.
363bb6c0cc80 Emit stub debug info for generated functions to work around LLVM bug 2172.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
26 * @return the Dwarf subprogram global.
363bb6c0cc80 Emit stub debug info for generated functions to work around LLVM bug 2172.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
27 */
946
1714836f2c0b Mostly rewrite debug info generation in terms of llvm/Analysis/DebugInfo.h.
Christian Kamm <kamm incasoftware de>
parents: 686
diff changeset
28 llvm::DISubprogram DtoDwarfSubProgramInternal(const char* prettyname, const char* mangledname);
686
363bb6c0cc80 Emit stub debug info for generated functions to work around LLVM bug 2172.
Christian Kamm <kamm incasoftware de>
parents: 664
diff changeset
29
82
d8dd47ef3973 [svn r86] Changed the way arguments are given storage. It is now detected if they will need it during semantic passes.
lindquist
parents:
diff changeset
30 void DtoDwarfFuncStart(FuncDeclaration* fd);
d8dd47ef3973 [svn r86] Changed the way arguments are given storage. It is now detected if they will need it during semantic passes.
lindquist
parents:
diff changeset
31 void DtoDwarfFuncEnd(FuncDeclaration* fd);
d8dd47ef3973 [svn r86] Changed the way arguments are given storage. It is now detected if they will need it during semantic passes.
lindquist
parents:
diff changeset
32
d8dd47ef3973 [svn r86] Changed the way arguments are given storage. It is now detected if they will need it during semantic passes.
lindquist
parents:
diff changeset
33 void DtoDwarfStopPoint(unsigned ln);
d8dd47ef3973 [svn r86] Changed the way arguments are given storage. It is now detected if they will need it during semantic passes.
lindquist
parents:
diff changeset
34
245
d61ce72c39ab [svn r262] Fixed debug info for normal function parameters.
lindquist
parents: 244
diff changeset
35 /**
d61ce72c39ab [svn r262] Fixed debug info for normal function parameters.
lindquist
parents: 244
diff changeset
36 * Emits all things necessary for making debug info for a local variable vd.
d61ce72c39ab [svn r262] Fixed debug info for normal function parameters.
lindquist
parents: 244
diff changeset
37 * @param ll LLVM Value of the variable.
d61ce72c39ab [svn r262] Fixed debug info for normal function parameters.
lindquist
parents: 244
diff changeset
38 * @param vd Variable declaration to emit debug info for.
d61ce72c39ab [svn r262] Fixed debug info for normal function parameters.
lindquist
parents: 244
diff changeset
39 */
d61ce72c39ab [svn r262] Fixed debug info for normal function parameters.
lindquist
parents: 244
diff changeset
40 void DtoDwarfLocalVariable(LLValue* ll, VarDeclaration* vd);
244
a95056b3c996 [svn r261] Fixed debug info for integer and floating local variables, can now be inspected in GDB.
lindquist
parents: 139
diff changeset
41
247
56199753e637 [svn r264] Fixed debug info for global variables.
lindquist
parents: 245
diff changeset
42 /**
56199753e637 [svn r264] Fixed debug info for global variables.
lindquist
parents: 245
diff changeset
43 * Emits all things necessary for making debug info for a global variable vd.
1650
40bd4a0d4870 Update to work with LLVM 2.7.
Tomas Lindquist Olsen
parents: 946
diff changeset
44 * @param ll
40bd4a0d4870 Update to work with LLVM 2.7.
Tomas Lindquist Olsen
parents: 946
diff changeset
45 * @param vd
40bd4a0d4870 Update to work with LLVM 2.7.
Tomas Lindquist Olsen
parents: 946
diff changeset
46 * @return
247
56199753e637 [svn r264] Fixed debug info for global variables.
lindquist
parents: 245
diff changeset
47 */
946
1714836f2c0b Mostly rewrite debug info generation in terms of llvm/Analysis/DebugInfo.h.
Christian Kamm <kamm incasoftware de>
parents: 686
diff changeset
48 llvm::DIGlobalVariable DtoDwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd);
247
56199753e637 [svn r264] Fixed debug info for global variables.
lindquist
parents: 245
diff changeset
49
1650
40bd4a0d4870 Update to work with LLVM 2.7.
Tomas Lindquist Olsen
parents: 946
diff changeset
50 #endif // DISABLE_DEBUG_INFO
82
d8dd47ef3973 [svn r86] Changed the way arguments are given storage. It is now detected if they will need it during semantic passes.
lindquist
parents:
diff changeset
51
1650
40bd4a0d4870 Update to work with LLVM 2.7.
Tomas Lindquist Olsen
parents: 946
diff changeset
52 #endif // LDC_GEN_TODEBUG_H