Mercurial > projects > ldc
diff gen/tollvm.cpp @ 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 | 9176437d98be |
children |
line wrap: on
line diff
--- a/gen/tollvm.cpp Fri Mar 19 09:31:25 2010 +0100 +++ b/gen/tollvm.cpp Wed May 19 12:42:32 2010 +0200 @@ -157,7 +157,7 @@ return getVoidPtrType(); /* - Not needed atm as VarDecls for tuples are rewritten as a string of + Not needed atm as VarDecls for tuples are rewritten as a string of VarDecls for the fields (u -> _u_field_0, ...) case Ttuple: @@ -289,12 +289,12 @@ { assert(0 && "not global/function"); } - + // The following breaks for nested naked functions and other declarations, so check for that. bool skipNestedCheck = !mustDefineSymbol(sym); if (FuncDeclaration* fd = sym->isFuncDeclaration()) skipNestedCheck = (fd->naked != 0); - + // Any symbol nested in a function can't be referenced directly from // outside that function, so we can give such symbols internal linkage. // This holds even if nested indirectly, such as member functions of @@ -313,7 +313,7 @@ if (parent->isFuncDeclaration()) return llvm::GlobalValue::InternalLinkage; } - + // default to external linkage return llvm::GlobalValue::ExternalLinkage; } @@ -362,7 +362,7 @@ return val; } // ptr is integer pointer - else if (ptrTy->isInteger()) + else if (ptrTy->isIntegerTy()) { // val is integer assert(valTy->isInteger());