summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvmc/CompilerDriver.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2005-07-07 18:21:42 +0000
committerReid Spencer <rspencer@reidspencer.com>2005-07-07 18:21:42 +0000
commit5b891e98471ec8a21e3cd2182a322c77aad200bb (patch)
tree41dd8e6fcd6d4347ca4ed7e22e8f52386e0a0d39 /llvm/tools/llvmc/CompilerDriver.cpp
parent2e81f65eb8c066ceb7f7eaa88abc37069ef4bc56 (diff)
downloadbcm5719-llvm-5b891e98471ec8a21e3cd2182a322c77aad200bb.tar.gz
bcm5719-llvm-5b891e98471ec8a21e3cd2182a322c77aad200bb.zip
For PR495:
Change interface to Path class: readable -> canRead writable -> canWrite executable -> canExecute More (incremental) changes coming to close 495. llvm-svn: 22345
Diffstat (limited to 'llvm/tools/llvmc/CompilerDriver.cpp')
-rw-r--r--llvm/tools/llvmc/CompilerDriver.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/tools/llvmc/CompilerDriver.cpp b/llvm/tools/llvmc/CompilerDriver.cpp
index 39a29899261..34e4038c139 100644
--- a/llvm/tools/llvmc/CompilerDriver.cpp
+++ b/llvm/tools/llvmc/CompilerDriver.cpp
@@ -187,7 +187,7 @@ private:
void cleanup() {
if (!isSet(KEEP_TEMPS_FLAG)) {
- if (TempDir.isDirectory() && TempDir.writable())
+ if (TempDir.isDirectory() && TempDir.canWrite())
TempDir.destroyDirectory(/*remove_contents=*/true);
} else {
std::cout << "Temporary files are in " << TempDir << "\n";
@@ -415,7 +415,7 @@ private:
if (progpath.isEmpty())
throw std::string("Can't find program '" +
action->program.toString()+"'");
- else if (progpath.executable())
+ else if (progpath.canExecute())
action->program = progpath;
else
throw std::string("Program '"+action->program.toString()+
@@ -449,32 +449,32 @@ private:
bool native = false) {
sys::Path fullpath;
fullpath.setFile(link_item);
- if (fullpath.readable())
+ if (fullpath.canRead())
return fullpath;
for (PathVector::iterator PI = LibraryPaths.begin(),
PE = LibraryPaths.end(); PI != PE; ++PI) {
fullpath.setDirectory(PI->toString());
fullpath.appendFile(link_item);
- if (fullpath.readable())
+ if (fullpath.canRead())
return fullpath;
if (native) {
fullpath.appendSuffix("a");
} else {
fullpath.appendSuffix("bc");
- if (fullpath.readable())
+ if (fullpath.canRead())
return fullpath;
fullpath.elideSuffix();
fullpath.appendSuffix("o");
- if (fullpath.readable())
+ if (fullpath.canRead())
return fullpath;
fullpath = *PI;
fullpath.appendFile(std::string("lib") + link_item);
fullpath.appendSuffix("a");
- if (fullpath.readable())
+ if (fullpath.canRead())
return fullpath;
fullpath.elideSuffix();
fullpath.appendSuffix("so");
- if (fullpath.readable())
+ if (fullpath.canRead())
return fullpath;
}
}
@@ -494,7 +494,7 @@ private:
// First, see if the unadorned file name is not readable. If so,
// we must track down the file in the lib search path.
sys::Path fullpath;
- if (!link_item.readable()) {
+ if (!link_item.canRead()) {
// look for the library using the -L arguments specified
// on the command line.
fullpath = GetPathForLinkageItem(link_item.toString());
OpenPOWER on IntegriCloud