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

@@ -12,7 +12,7 @@
#include "llvm/GlobalValue.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/raw_os_ostream.h"
#include "llvm/Assembly/Writer.h"
#include "gen/logger.h"
@@ -27,10 +27,11 @@ void Stream::writeValue(std::ostream& OS, const llvm::Value& V) {
// Constants don't always get their types pretty-printed.
// (Only treat non-global constants like this, so that e.g. global variables
// still get their initializers printed)
llvm::raw_os_ostream raw(OS);
if (llvm::isa<llvm::Constant>(V) && !llvm::isa<llvm::GlobalValue>(V))
llvm::WriteAsOperand(OS, &V, true, gIR->module);
llvm::WriteAsOperand(raw, &V, true, gIR->module);
else
OS << V;
V.print(raw);
}
namespace Logger