[llvm-commits] CVS: llvm/tools/llvmc/CompilerDriver.cpp
Reid Spencer
reid at x10sys.com
Thu Mar 29 12:06:33 PDT 2007
Changes in directory llvm/tools/llvmc:
CompilerDriver.cpp updated: 1.45 -> 1.46
---
Log message:
For PR789: http://llvm.org/PR789 :
Make the sys::Path::getFileStatus function more efficient by having it
return a pointer to the FileStatus structure rather than copy it. Adjust
uses of the function accordingly. Also, fix some memory issues in sys::Path.
---
Diffs of the changes: (+2 -2)
CompilerDriver.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/tools/llvmc/CompilerDriver.cpp
diff -u llvm/tools/llvmc/CompilerDriver.cpp:1.45 llvm/tools/llvmc/CompilerDriver.cpp:1.46
--- llvm/tools/llvmc/CompilerDriver.cpp:1.45 Fri Feb 16 13:11:07 2007
+++ llvm/tools/llvmc/CompilerDriver.cpp Thu Mar 29 14:05:44 2007
@@ -195,8 +195,8 @@
void cleanup() {
if (!isSet(KEEP_TEMPS_FLAG)) {
- sys::FileStatus Status;
- if (!TempDir.getFileStatus(Status) && Status.isDir)
+ const sys::FileStatus *Status = TempDir.getFileStatus();
+ if (Status && Status->isDir)
TempDir.eraseFromDisk(/*remove_contents=*/true);
} else {
std::cout << "Temporary files are in " << TempDir << "\n";
More information about the llvm-commits
mailing list