view gen/todebug.h @ 715:30b42a283c8e

Removed TypeOpaque from DMD. Changed runtime functions taking opaque[] to void[]. Implemented proper type painting, to avoid "resizing" array casts in runtime calls that previously took opaque[]. Implemented dynamic arrays as first class types, this implements proper ABI for these types on x86. Added dwarf region end after call to assert function, fixes some problems with llvm not allowing this to be missing. Reverted change to WithStatement from rev [704] it breaks MiniD, mini/with2.d needs to be fixed some other way... Fixed tango bug 1339 in runtime, problem with _adReverseChar on invalid UTF-8. Disabled .bc generation in the compiler runtime part, genobj.d triggers some llvm bug when using debug info. the .o seems to work fine.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Wed, 22 Oct 2008 14:55:33 +0200
parents 363bb6c0cc80
children 1714836f2c0b
line wrap: on
line source

#ifndef LDC_GEN_TODEBUG_H
#define LDC_GEN_TODEBUG_H

void RegisterDwarfSymbols(llvm::Module* mod);

/**
 * Emit the Dwarf compile_unit global for a Module m.
 * @param m
 * @return the Dwarf compile_unit.
 */
llvm::GlobalVariable* DtoDwarfCompileUnit(Module* m);

/**
 * Emit the Dwarf subprogram global for a function declaration fd.
 * @param fd
 * @return the Dwarf subprogram global.
 */
llvm::GlobalVariable* DtoDwarfSubProgram(FuncDeclaration* fd);

/**
 * Emit the Dwarf subprogram global for a internal function.
 * This is used for generated functions like moduleinfoctors, 
 * module ctors/dtors and unittests.
 * @return the Dwarf subprogram global.
 */
llvm::GlobalVariable* DtoDwarfSubProgramInternal(const char* prettyname, const char* mangledname);

void DtoDwarfFuncStart(FuncDeclaration* fd);
void DtoDwarfFuncEnd(FuncDeclaration* fd);

void DtoDwarfStopPoint(unsigned ln);

/**
 * Emits all things necessary for making debug info for a local variable vd.
 * @param ll LLVM Value of the variable.
 * @param vd Variable declaration to emit debug info for.
 */
void DtoDwarfLocalVariable(LLValue* ll, VarDeclaration* vd);

/**
 * Emits all things necessary for making debug info for a global variable vd.
 * @param ll 
 * @param vd 
 * @return 
 */
LLGlobalVariable* DtoDwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd);

#endif // LDC_GEN_TODEBUG_H