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.
This commit is contained in:
Tomas Lindquist Olsen
2010-05-19 12:42:32 +02:00
parent 5707961243
commit 1fac40d2bd
27 changed files with 992 additions and 242 deletions

View File

@@ -1,6 +1,8 @@
#ifndef LDC_GEN_TODEBUG_H
#define LDC_GEN_TODEBUG_H
#ifndef DISABLE_DEBUG_INFO
void RegisterDwarfSymbols(llvm::Module* mod);
/**
@@ -19,7 +21,7 @@ llvm::DISubprogram DtoDwarfSubProgram(FuncDeclaration* fd);
/**
* Emit the Dwarf subprogram global for a internal function.
* This is used for generated functions like moduleinfoctors,
* This is used for generated functions like moduleinfoctors,
* module ctors/dtors and unittests.
* @return the Dwarf subprogram global.
*/
@@ -39,12 +41,12 @@ void DtoDwarfLocalVariable(LLValue* ll, VarDeclaration* vd);
/**
* Emits all things necessary for making debug info for a global variable vd.
* @param ll
* @param vd
* @return
* @param ll
* @param vd
* @return
*/
llvm::DIGlobalVariable DtoDwarfGlobalVariable(LLGlobalVariable* ll, VarDeclaration* vd);
#endif // DISABLE_DEBUG_INFO
#endif // LDC_GEN_TODEBUG_H