diff options
Diffstat (limited to 'clang/lib/Frontend/CompilerInstance.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInstance.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp index bbcb71f3f1f..1605012e8c4 100644 --- a/clang/lib/Frontend/CompilerInstance.cpp +++ b/clang/lib/Frontend/CompilerInstance.cpp @@ -454,8 +454,8 @@ void CompilerInstance::clearOutputFiles(bool EraseFiles) { // If '-working-directory' was passed, the output filename should be // relative to that. FileMgr->FixupRelativePath(NewOutFile); - if (llvm::error_code ec = llvm::sys::fs::rename(it->TempFilename, - NewOutFile.str())) { + if (std::error_code ec = + llvm::sys::fs::rename(it->TempFilename, NewOutFile.str())) { getDiagnostics().Report(diag::err_unable_to_rename_temp) << it->TempFilename << it->Filename << ec.message(); @@ -568,7 +568,7 @@ CompilerInstance::createOutputFile(StringRef OutputPath, TempPath = OutFile; TempPath += "-%%%%%%%%"; int fd; - llvm::error_code EC = + std::error_code EC = llvm::sys::fs::createUniqueFile(TempPath.str(), fd, TempPath); if (CreateMissingDirectories && @@ -665,7 +665,7 @@ bool CompilerInstance::InitializeSourceManager(const FrontendInputFile &Input, SourceMgr.createFileID(File, SourceLocation(), Kind)); } else { std::unique_ptr<llvm::MemoryBuffer> SB; - if (llvm::error_code ec = llvm::MemoryBuffer::getSTDIN(SB)) { + if (std::error_code ec = llvm::MemoryBuffer::getSTDIN(SB)) { Diags.Report(diag::err_fe_error_reading_stdin) << ec.message(); return false; } @@ -1051,7 +1051,7 @@ static void pruneModuleCache(const HeaderSearchOptions &HSOpts) { // Walk the entire module cache, looking for unused module files and module // indices. - llvm::error_code EC; + std::error_code EC; SmallString<128> ModuleCachePathNative; llvm::sys::path::native(HSOpts.ModuleCachePath, ModuleCachePathNative); for (llvm::sys::fs::directory_iterator |