r186487 - Use the simpler is_directory.
Rafael Espindola
rafael.espindola at gmail.com
Tue Jul 16 21:23:07 PDT 2013
Author: rafael
Date: Tue Jul 16 23:23:07 2013
New Revision: 186487
URL: http://llvm.org/viewvc/llvm-project?rev=186487&view=rev
Log:
Use the simpler is_directory.
Modified:
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/lib/Frontend/CompilerInstance.cpp
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=186487&r1=186486&r2=186487&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Tue Jul 16 23:23:07 2013
@@ -1569,8 +1569,7 @@ std::string Driver::GetProgramPath(const
// 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)))
Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=186487&r1=186486&r2=186487&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Tue Jul 16 23:23:07 2013
@@ -1052,8 +1052,7 @@ static void pruneModuleCache(const Heade
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.
More information about the cfe-commits
mailing list