diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-17 04:23:07 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-07-17 04:23:07 +0000 |
commit | a07f720a1bde78ae2ff0fdc1fa73e8484c5938dd (patch) | |
tree | 914dfc2c5b951ea10cb47fc6fb879f4bada7fb17 /clang/lib | |
parent | 904165fc7ce3e886caaea9f3141358d4308560c9 (diff) | |
download | bcm5719-llvm-a07f720a1bde78ae2ff0fdc1fa73e8484c5938dd.tar.gz bcm5719-llvm-a07f720a1bde78ae2ff0fdc1fa73e8484c5938dd.zip |
Use the simpler is_directory.
llvm-svn: 186487
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 41b6387437f..f49e79046a6 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1569,8 +1569,7 @@ std::string Driver::GetProgramPath(const char *Name, // attempting to use this prefix when looking for program paths. for (Driver::prefix_list::const_iterator it = PrefixDirs.begin(), ie = PrefixDirs.end(); it != ie; ++it) { - bool IsDirectory; - if (!llvm::sys::fs::is_directory(*it, IsDirectory) && IsDirectory) { + if (llvm::sys::fs::is_directory(*it)) { SmallString<128> P(*it); llvm::sys::path::append(P, TargetSpecificExecutable); if (llvm::sys::fs::can_execute(Twine(P))) diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index 44d9ec22ed0..f06eaf87360 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -1052,8 +1052,7 @@ static void pruneModuleCache(const HeaderSearchOptions &HSOpts) { Dir(ModuleCachePathNative.str(), EC), DirEnd; Dir != DirEnd && !EC; Dir.increment(EC)) { // If we don't have a directory, there's nothing to look into. - bool IsDirectory; - if (llvm::sys::fs::is_directory(Dir->path(), IsDirectory) || !IsDirectory) + if (!llvm::sys::fs::is_directory(Dir->path())) continue; // Walk all of the files within this directory. |