diff options
Diffstat (limited to 'lib/Core/StatsTracker.cpp')
-rw-r--r-- | lib/Core/StatsTracker.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp index 54dd0df8..0e564fe5 100644 --- a/lib/Core/StatsTracker.cpp +++ b/lib/Core/StatsTracker.cpp @@ -52,11 +52,18 @@ #include "llvm/Type.h" #endif #include "llvm/Support/CommandLine.h" -#include "llvm/Support/CFG.h" #include "llvm/Support/Process.h" #include "llvm/Support/Path.h" #include "llvm/Support/FileSystem.h" +#if LLVM_VERSION_CODE < LLVM_VERSION(3, 5) +#include "llvm/Support/CallSite.h" +#include "llvm/Support/CFG.h" +#else +#include "llvm/IR/CallSite.h" +#include "llvm/IR/CFG.h" +#endif + #include <fstream> #include <unistd.h> @@ -190,8 +197,13 @@ StatsTracker::StatsTracker(Executor &_executor, std::string _objectFilename, SmallString<128> current(objectFilename); if(sys::fs::make_absolute(current)) { bool exists = false; + +#if LLVM_VERSION_CODE < LLVM_VERSION(3, 5) error_code ec = sys::fs::exists(current.str(), exists); if (ec == errc::success && exists) { +#else + if (!sys::fs::exists(current.str(), exists)) { +#endif objectFilename = current.c_str(); } } |