[llvm-commits] [lld] r149431 - /lld/trunk/tools/lld-core/lld-core.cpp
Michael J. Spencer
bigcheesegs at gmail.com
Tue Jan 31 13:46:52 PST 2012
Author: mspencer
Date: Tue Jan 31 15:46:52 2012
New Revision: 149431
URL: http://llvm.org/viewvc/llvm-project?rev=149431&view=rev
Log:
Don't delete the temp file until after we finish reading from it.
Modified:
lld/trunk/tools/lld-core/lld-core.cpp
Modified: lld/trunk/tools/lld-core/lld-core.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/tools/lld-core/lld-core.cpp?rev=149431&r1=149430&r2=149431&view=diff
==============================================================================
--- lld/trunk/tools/lld-core/lld-core.cpp (original)
+++ lld/trunk/tools/lld-core/lld-core.cpp Tue Jan 31 15:46:52 2012
@@ -235,13 +235,13 @@
// read native file
lld::File* natFile;
parseNativeObjectFileOrSTDIN(tempPath, natFile);
-
- // delete temp .o file
- bool existed;
- llvm::sys::fs::remove(tempPath.str(), existed);
// write new atom graph out as YAML doc
yaml::writeObjectText(*natFile, out);
+ // delete temp .o file
+ bool existed;
+ llvm::sys::fs::remove(tempPath.str(), existed);
+
return 0;
}
More information about the llvm-commits
mailing list