aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInstance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInstance.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index ee8c403..b23baa5 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -536,7 +536,7 @@ void CompilerInstance::clearOutputFiles(bool EraseFiles) {
// relative to that.
FileMgr->FixupRelativePath(NewOutFile);
if (std::error_code ec =
- llvm::sys::fs::rename(it->TempFilename, NewOutFile.str())) {
+ llvm::sys::fs::rename(it->TempFilename, NewOutFile)) {
getDiagnostics().Report(diag::err_unable_to_rename_temp)
<< it->TempFilename << it->Filename << ec.message();
@@ -641,14 +641,14 @@ llvm::raw_fd_ostream *CompilerInstance::createOutputFile(
TempPath += "-%%%%%%%%";
int fd;
std::error_code EC =
- llvm::sys::fs::createUniqueFile(TempPath.str(), fd, TempPath);
+ llvm::sys::fs::createUniqueFile(TempPath, fd, TempPath);
if (CreateMissingDirectories &&
EC == llvm::errc::no_such_file_or_directory) {
StringRef Parent = llvm::sys::path::parent_path(OutputPath);
EC = llvm::sys::fs::create_directories(Parent);
if (!EC) {
- EC = llvm::sys::fs::createUniqueFile(TempPath.str(), fd, TempPath);
+ EC = llvm::sys::fs::createUniqueFile(TempPath, fd, TempPath);
}
}
@@ -1191,8 +1191,7 @@ static void pruneModuleCache(const HeaderSearchOptions &HSOpts) {
std::error_code EC;
SmallString<128> ModuleCachePathNative;
llvm::sys::path::native(HSOpts.ModuleCachePath, ModuleCachePathNative);
- for (llvm::sys::fs::directory_iterator
- Dir(ModuleCachePathNative.str(), EC), DirEnd;
+ for (llvm::sys::fs::directory_iterator Dir(ModuleCachePathNative, EC), DirEnd;
Dir != DirEnd && !EC; Dir.increment(EC)) {
// If we don't have a directory, there's nothing to look into.
if (!llvm::sys::fs::is_directory(Dir->path()))