diff gen/todebug.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 8d086d552909
children
line wrap: on
line diff
--- a/gen/todebug.cpp	Fri Mar 19 09:31:25 2010 +0100
+++ b/gen/todebug.cpp	Wed May 19 12:42:32 2010 +0200
@@ -19,6 +19,8 @@
 
 using namespace llvm::dwarf;
 
+#ifndef DISABLE_DEBUG_INFO
+
 #define DBG_NULL    ( LLConstant::getNullValue(DBG_TYPE) )
 #define DBG_TYPE    ( getPtrToType(llvm::StructType::get(gIR->context(),NULL,NULL)) )
 #define DBG_CAST(X) ( llvm::ConstantExpr::getBitCast(X, DBG_TYPE) )
@@ -220,7 +222,7 @@
     }
 }
 
-//FIXME: This does not use llvm's DIFactory as it can't 
+//FIXME: This does not use llvm's DIFactory as it can't
 //   handle recursive types properly.
 static llvm::DICompositeType dwarfCompositeType(Type* type, llvm::DICompileUnit compileUnit)
 {
@@ -530,7 +532,7 @@
         false, // isMain,
         false // isOptimized
     );
-    
+
     // if the linkage stays internal, we can't llvm-link the generated modules together:
     // llvm's DwarfWriter uses path and filename to determine the symbol name and we'd
     // end up with duplicate symbols
@@ -636,3 +638,5 @@
         gIR->scopebb()
     );
 }
+
+#endif