aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorNicolas Geoffray <nicolas.geoffray@lip6.fr>2008-02-13 18:39:37 +0000
committerNicolas Geoffray <nicolas.geoffray@lip6.fr>2008-02-13 18:39:37 +0000
commitafe6c2b001a924cd74bd0aacfed5984d9af004b0 (patch)
treee028f30be64937c842b04895eab4abe731478dfb /lib/CodeGen
parent84ad8378eea47288fb1c923312689bdd01cd4264 (diff)
downloadexternal_llvm-afe6c2b001a924cd74bd0aacfed5984d9af004b0.zip
external_llvm-afe6c2b001a924cd74bd0aacfed5984d9af004b0.tar.gz
external_llvm-afe6c2b001a924cd74bd0aacfed5984d9af004b0.tar.bz2
Enable exception handling int JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47079 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/ELFWriter.cpp15
-rw-r--r--lib/CodeGen/LLVMTargetMachine.cpp4
-rw-r--r--lib/CodeGen/MachOWriter.cpp14
3 files changed, 31 insertions, 2 deletions
diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp
index 908abe5..82bf992 100644
--- a/lib/CodeGen/ELFWriter.cpp
+++ b/lib/CodeGen/ELFWriter.cpp
@@ -98,6 +98,21 @@ namespace llvm {
return 0;
}
+ virtual intptr_t getLabelAddress(uint64_t Label) const {
+ assert(0 && "Label address not implementated yet!");
+ abort();
+ return 0;
+ }
+
+ virtual void emitLabel(uint64_t LabelID) {
+ assert(0 && "emit Label not implementated yet!");
+ abort();
+ }
+
+
+ virtual void setModuleInfo(llvm::MachineModuleInfo* MMI) { }
+
+
/// JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE!
void startFunctionStub(unsigned StubSize, unsigned Alignment = 1) {
assert(0 && "JIT specific function called!");
diff --git a/lib/CodeGen/LLVMTargetMachine.cpp b/lib/CodeGen/LLVMTargetMachine.cpp
index 351554b..5611b03 100644
--- a/lib/CodeGen/LLVMTargetMachine.cpp
+++ b/lib/CodeGen/LLVMTargetMachine.cpp
@@ -186,8 +186,8 @@ bool LLVMTargetMachine::addPassesToEmitMachineCode(FunctionPassManager &PM,
PM.add(createGCLoweringPass());
- // FIXME: Implement the invoke/unwind instructions!
- PM.add(createLowerInvokePass(getTargetLowering()));
+ if (!ExceptionHandling)
+ PM.add(createLowerInvokePass(getTargetLowering()));
// Make sure that no unreachable blocks are instruction selected.
PM.add(createUnreachableBlockEliminationPass());
diff --git a/lib/CodeGen/MachOWriter.cpp b/lib/CodeGen/MachOWriter.cpp
index 71e7430..92b3eb4 100644
--- a/lib/CodeGen/MachOWriter.cpp
+++ b/lib/CodeGen/MachOWriter.cpp
@@ -125,6 +125,20 @@ namespace llvm {
return MBBLocations[MBB->getNumber()];
}
+ virtual intptr_t getLabelAddress(uint64_t Label) const {
+ assert(0 && "get Label not implemented");
+ abort();
+ return 0;
+ }
+
+ virtual void emitLabel(uint64_t LabelID) {
+ assert(0 && "emit Label not implemented");
+ abort();
+ }
+
+
+ virtual void setModuleInfo(llvm::MachineModuleInfo* MMI) { }
+
/// JIT SPECIFIC FUNCTIONS - DO NOT IMPLEMENT THESE HERE!
virtual void startFunctionStub(unsigned StubSize, unsigned Alignment = 1) {
assert(0 && "JIT specific function called!");