Skip to content

Commit

Permalink
Update disasm support for LLVM API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Jan 31, 2014
1 parent 896dcc9 commit 6a55c65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
#include "llvm/Analysis/Verifier.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/Bitcode/ReaderWriter.h"
#if defined(LLVM_VERSION_MAJOR) && LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 5
#define LLVM35 1
#endif
#if defined(LLVM_VERSION_MAJOR) && LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 4
#define LLVM34 1
#define USE_MCJIT 1
Expand Down
4 changes: 4 additions & 0 deletions src/disasm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ void jl_dump_function_asm(void* Fptr, size_t Fsize,
// Fall through

case MCDisassembler::Success:
#ifdef LLVM35
Streamer->EmitInstruction(Inst, *STI);
#else
Streamer->EmitInstruction(Inst);
#endif
break;
}
}
Expand Down

0 comments on commit 6a55c65

Please sign in to comment.