diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-09-30 04:52:23 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-09-30 04:52:23 +0000 |
commit | e69a71a164be39baef2a4d3e450c733fd4c7868a (patch) | |
tree | d44e95dc98fb836f5d7f5cff055431e8eac1b801 /lib/Module | |
parent | 423989c4af2a2e436ed5c8b5a826f784367525ce (diff) | |
download | klee-e69a71a164be39baef2a4d3e450c733fd4c7868a.tar.gz |
Update for spurious LLVM API changes.
- God forbid we manage to keep an API stable for a single release cycle. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@115139 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Module')
-rw-r--r-- | lib/Module/InstructionInfoTable.cpp | 13 | ||||
-rw-r--r-- | lib/Module/ModuleUtil.cpp | 4 |
2 files changed, 16 insertions, 1 deletions
diff --git a/lib/Module/InstructionInfoTable.cpp b/lib/Module/InstructionInfoTable.cpp index 2efe981b..0a96643c 100644 --- a/lib/Module/InstructionInfoTable.cpp +++ b/lib/Module/InstructionInfoTable.cpp @@ -15,7 +15,12 @@ #include "llvm/IntrinsicInst.h" #include "llvm/Linker.h" #include "llvm/Module.h" +#if (LLVM_MAJOR_VERSION == 2 && LLVM_MINOR_VERSION < 8) #include "llvm/Assembly/AsmAnnotationWriter.h" +#else +#include "llvm/Assembly/AssemblyAnnotationWriter.h" +#include "llvm/Support/FormattedStream.h" +#endif #include "llvm/Support/CFG.h" #include "llvm/Support/InstIterator.h" #include "llvm/Support/raw_ostream.h" @@ -32,8 +37,14 @@ using namespace klee; class InstructionToLineAnnotator : public llvm::AssemblyAnnotationWriter { public: +#if (LLVM_MAJOR_VERSION == 2 && LLVM_MINOR_VERSION < 8) void emitInstructionAnnot(const Instruction *i, llvm::raw_ostream &os) { - os << "%%%" << (uintptr_t) i; +#else + void emitInstructionAnnot(const Instruction *i, + llvm::formatted_raw_ostream &os) { +#endif + os << "%%%"; + os << (uintptr_t) i; } }; diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp index 17c4aa91..ff3301ed 100644 --- a/lib/Module/ModuleUtil.cpp +++ b/lib/Module/ModuleUtil.cpp @@ -15,7 +15,11 @@ #include "llvm/IntrinsicInst.h" #include "llvm/Linker.h" #include "llvm/Module.h" +#if (LLVM_MAJOR_VERSION == 2 && LLVM_MINOR_VERSION < 8) #include "llvm/Assembly/AsmAnnotationWriter.h" +#else +#include "llvm/Assembly/AssemblyAnnotationWriter.h" +#endif #include "llvm/Support/CFG.h" #include "llvm/Support/CallSite.h" #include "llvm/Support/InstIterator.h" |