From 870f2d6aac35457e7524078a4b4a8b011f84c45c Mon Sep 17 00:00:00 2001 From: Richard Trembecký Date: Thu, 28 Apr 2016 18:27:24 +0200 Subject: llvm: make KLEE compile against LLVM 3.7 Signed-off-by: Jiri Slaby --- lib/Module/InstructionInfoTable.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/Module/InstructionInfoTable.cpp') diff --git a/lib/Module/InstructionInfoTable.cpp b/lib/Module/InstructionInfoTable.cpp index e2f05205..3d9bf5ae 100644 --- a/lib/Module/InstructionInfoTable.cpp +++ b/lib/Module/InstructionInfoTable.cpp @@ -94,9 +94,15 @@ bool InstructionInfoTable::getInstructionDebugInfo(const llvm::Instruction *I, const std::string *&File, unsigned &Line) { if (MDNode *N = I->getMetadata("dbg")) { +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 7) + DILocation *Loc = cast(N); + File = internString(getDSPIPath(*Loc)); + Line = Loc->getLine(); +#else DILocation Loc(N); File = internString(getDSPIPath(Loc)); Line = Loc.getLineNumber(); +#endif return true; } -- cgit 1.4.1