diff options
author | Cristian Cadar <c.cadar@imperial.ac.uk> | 2013-08-28 14:00:36 +0100 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2013-08-28 14:00:36 +0100 |
commit | c7874f2ad92a9f26430038f7a9426dec1fe632ea (patch) | |
tree | 36f8ee7e39294978134d70ef5f8384380a14cde2 /lib/Core/StatsTracker.cpp | |
parent | 821b6f6473334eaa6c78205603faf14a2c1aca41 (diff) | |
parent | 6c445f2b1a1f91ffb301bece325dd5a491922ce1 (diff) | |
download | klee-c7874f2ad92a9f26430038f7a9426dec1fe632ea.tar.gz |
Merge branch 'CompilerWarnings' of https://github.com/MartinNowack/klee into MartinNowack-CompilerWarnings
Diffstat (limited to 'lib/Core/StatsTracker.cpp')
-rw-r--r-- | lib/Core/StatsTracker.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Core/StatsTracker.cpp b/lib/Core/StatsTracker.cpp index f81d19d8..c0028a05 100644 --- a/lib/Core/StatsTracker.cpp +++ b/lib/Core/StatsTracker.cpp @@ -45,6 +45,9 @@ #include "llvm/System/Path.h" #else #include "llvm/Support/Path.h" +#if LLVM_VERSION_CODE >= LLVM_VERSION(3, 1) +#include "llvm/Support/FileSystem.h" +#endif #endif #include <iostream> @@ -177,10 +180,18 @@ StatsTracker::StatsTracker(Executor &_executor, std::string _objectFilename, KModule *km = executor.kmodule; sys::Path module(objectFilename); +#if LLVM_VERSION_CODE < LLVM_VERSION(3, 1) if (!sys::Path(objectFilename).isAbsolute()) { +#else + if (!sys::path::is_absolute(objectFilename)) { +#endif sys::Path current = sys::Path::GetCurrentDirectory(); current.appendComponent(objectFilename); +#if LLVM_VERSION_CODE < LLVM_VERSION(3, 1) if (current.exists()) +#else + if (sys::fs::exists(current.c_str())) +#endif objectFilename = current.c_str(); } |