[cfe-commits] r84415 - /cfe/trunk/lib/Frontend/ASTUnit.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sun Oct 18 04:34:15 PDT 2009
Author: d0k
Date: Sun Oct 18 06:34:14 2009
New Revision: 84415
URL: http://llvm.org/viewvc/llvm-project?rev=84415&view=rev
Log:
Use sys::Path::eraseFromDisk instead of unlink as suggested by Chris.
Modified:
cfe/trunk/lib/Frontend/ASTUnit.cpp
Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=84415&r1=84414&r2=84415&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Sun Oct 18 06:34:14 2009
@@ -21,13 +21,14 @@
#include "clang/Basic/TargetInfo.h"
#include "clang/Basic/Diagnostic.h"
#include "llvm/Support/Compiler.h"
+#include "llvm/System/Path.h"
using namespace clang;
ASTUnit::ASTUnit(Diagnostic &_Diags) : Diags(_Diags), tempFile(false) { }
ASTUnit::~ASTUnit() {
if (tempFile)
- unlink(getPCHFileName().c_str());
+ llvm::sys::Path(getPCHFileName()).eraseFromDisk();
}
namespace {
More information about the cfe-commits
mailing list