Remove some uses of llvm::sys::Path.

llvm-svn: 184907
This commit is contained in:
Rafael Espindola 2013-06-26 03:52:38 +00:00
parent 76565f08f7
commit bc7d949b32
2 changed files with 8 additions and 8 deletions

View File

@ -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; }

View File

@ -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);
}