diff options
author | Martin Nowack <martin@se.inf.tu-dresden.de> | 2013-01-15 12:00:08 +0100 |
---|---|---|
committer | Martin Nowack <martin.nowack@gmail.com> | 2013-08-28 08:54:50 +0200 |
commit | 6c68f4ba60b860e83b8ee08b97f18f6a6cc29156 (patch) | |
tree | 4949f7faa7c7710d5837944959986080d419becb | |
parent | 4ffd4b14b768a01006d515c6cad5c9b36ffdc4be (diff) | |
download | klee-6c68f4ba60b860e83b8ee08b97f18f6a6cc29156.tar.gz |
Silence warning of deprecated PathV1 usage
-rw-r--r-- | lib/Core/StatsTracker.cpp | 11 | ||||
-rw-r--r-- | tools/klee/main.cpp | 4 |
2 files changed, 15 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(); } diff --git a/tools/klee/main.cpp b/tools/klee/main.cpp index 79f29d2d..e4de4769 100644 --- a/tools/klee/main.cpp +++ b/tools/klee/main.cpp @@ -303,7 +303,11 @@ KleeHandler::KleeHandler(int argc, char **argv) } sys::Path p(theDir); +#if LLVM_VERSION_CODE < LLVM_VERSION(3, 1) if (!p.isAbsolute()) { +#else + if (!sys::path::is_absolute(p.c_str())) { +#endif sys::Path cwd = sys::Path::GetCurrentDirectory(); cwd.appendComponent(theDir); p = cwd; |