[llvm-commits] CVS: llvm-java/lib/ClassFile/ClassFile.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Sun Dec 12 23:43:57 PST 2004
Changes in directory llvm-java/lib/ClassFile:
ClassFile.cpp updated: 1.32 -> 1.33
---
Log message:
Use Path::exists() to check for file existance and not isFile().
---
Diffs of the changes: (+5 -2)
Index: llvm-java/lib/ClassFile/ClassFile.cpp
diff -u llvm-java/lib/ClassFile/ClassFile.cpp:1.32 llvm-java/lib/ClassFile/ClassFile.cpp:1.33
--- llvm-java/lib/ClassFile/ClassFile.cpp:1.32 Mon Dec 13 01:15:00 2004
+++ llvm-java/lib/ClassFile/ClassFile.cpp Mon Dec 13 01:43:46 2004
@@ -182,8 +182,10 @@
unsigned b = 0, e = 0;
do {
e = ClassPath.find(':', b);
- if (path.setDirectory(ClassPath.substr(b, e - b)))
+ if (path.setDirectory(ClassPath.substr(b, e - b))) {
result.push_back(path);
+ DEBUG(std::cerr << "Adding: " << path.toString() << " to CLASSPATH\nx");
+ }
b = e + 1;
} while (e != std::string::npos);
@@ -204,9 +206,10 @@
for (unsigned i = 0, e = classpath.size(); i != e; ++i) {
sys::Path filename = classpath[i];
+ assert(filename.isDirectory() && "CLASSPATH element not a directory!");
filename.appendFile(clazz);
DEBUG(std::cerr << "Trying file: " << filename.toString() << '\n');
- if (filename.isFile())
+ if (filename.exists())
return filename;
}
More information about the llvm-commits
mailing list