summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-06-26 03:52:38 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-06-26 03:52:38 +0000
commitbc7d949b32060fab45484dd8ebec6affc09887c1 (patch)
tree2677ade24563112882e92b3f5f5e2d247f6891e2
parent76565f08f7b8c6d7ccefefd6f22ac42c62665c5e (diff)
downloadbcm5719-llvm-bc7d949b32060fab45484dd8ebec6affc09887c1.tar.gz
bcm5719-llvm-bc7d949b32060fab45484dd8ebec6affc09887c1.zip
Remove some uses of llvm::sys::Path.
llvm-svn: 184907
-rw-r--r--clang/include/clang/Frontend/ASTUnit.h4
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp12
2 files changed, 8 insertions, 8 deletions
diff --git a/clang/include/clang/Frontend/ASTUnit.h b/clang/include/clang/Frontend/ASTUnit.h
index c915776963e..52f7f098d68 100644
--- a/clang/include/clang/Frontend/ASTUnit.h
+++ b/clang/include/clang/Frontend/ASTUnit.h
@@ -478,8 +478,8 @@ public:
/// \brief Add a temporary file that the ASTUnit depends on.
///
/// This file will be erased when the ASTUnit is destroyed.
- void addTemporaryFile(const llvm::sys::Path &TempFile);
-
+ void addTemporaryFile(StringRef TempFile);
+
bool getOnlyLocalDecls() const { return OnlyLocalDecls; }
bool getOwnsRemappedFileBuffers() const { return OwnsRemappedFileBuffers; }
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index 364d8f30405..e5a8d17c203 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/lib/Frontend/ASTUnit.cpp
@@ -84,10 +84,10 @@ namespace {
/// \brief The file in which the precompiled preamble is stored.
std::string PreambleFile;
- /// \brief Temporary files that should be removed when the ASTUnit is
+ /// \brief Temporary files that should be removed when the ASTUnit is
/// destroyed.
- SmallVector<llvm::sys::Path, 4> TemporaryFiles;
-
+ SmallVector<std::string, 4> TemporaryFiles;
+
/// \brief Erase temporary files.
void CleanTemporaryFiles();
@@ -166,8 +166,8 @@ static const std::string &getPreambleFile(const ASTUnit *AU) {
void OnDiskData::CleanTemporaryFiles() {
for (unsigned I = 0, N = TemporaryFiles.size(); I != N; ++I)
- TemporaryFiles[I].eraseFromDisk();
- TemporaryFiles.clear();
+ llvm::sys::fs::remove(TemporaryFiles[I]);
+ TemporaryFiles.clear();
}
void OnDiskData::CleanPreambleFile() {
@@ -201,7 +201,7 @@ void ASTUnit::CleanTemporaryFiles() {
getOnDiskData(this).CleanTemporaryFiles();
}
-void ASTUnit::addTemporaryFile(const llvm::sys::Path &TempFile) {
+void ASTUnit::addTemporaryFile(StringRef TempFile) {
getOnDiskData(this).TemporaryFiles.push_back(TempFile);
}
OpenPOWER on IntegriCloud