about summary refs log tree commit diff homepage
path: root/lib
diff options
context:
space:
mode:
authorDan Liew <daniel.liew@imperial.ac.uk>2014-08-20 22:00:53 +0100
committerDaniel Dunbar <daniel@zuster.org>2014-09-14 16:27:59 -0700
commit136a3dd6f2ac2acfbbf19e405eae0c4dd68bda15 (patch)
tree70666bd8cd93822039caae0fb14c358e90e777ea /lib
parent8ef9d62a07b23ce07c07f18347e6f486b33bb31e (diff)
downloadklee-136a3dd6f2ac2acfbbf19e405eae0c4dd68bda15.tar.gz
Fix LLVM3.5 compilation due to switching to std::error_code
Diffstat (limited to 'lib')
-rw-r--r--lib/Core/StatsTracker.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp
index c4fa9ea1..0e564fe5 100644
--- a/lib/Core/StatsTracker.cpp
+++ b/lib/Core/StatsTracker.cpp
@@ -197,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();
       }
     }