From 136a3dd6f2ac2acfbbf19e405eae0c4dd68bda15 Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Wed, 20 Aug 2014 22:00:53 +0100 Subject: Fix LLVM3.5 compilation due to switching to std::error_code --- lib/Core/StatsTracker.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Core') 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(); } } -- cgit 1.4.1