diff --git a/lib/Basic/VirtualFileSystem.cpp b/lib/Basic/VirtualFileSystem.cpp index a469c9abc392d7155395d783c91833610b094a41..1892839e2b1894e8c65c5c71a0884074474d3d57 100644 --- a/lib/Basic/VirtualFileSystem.cpp +++ b/lib/Basic/VirtualFileSystem.cpp @@ -142,7 +142,7 @@ error_code RealFile::close() { if (::close(FD)) return error_code(errno, system_category()); FD = -1; - return error_code::success(); + return error_code(); } void RealFile::setName(StringRef Name) { @@ -175,7 +175,7 @@ error_code RealFileSystem::openFileForRead(const Twine &Name, return EC; Result.reset(new RealFile(FD)); Result->setName(Name.str()); - return error_code::success(); + return error_code(); } IntrusiveRefCntPtr<FileSystem> vfs::getRealFileSystem() { @@ -829,7 +829,7 @@ error_code VFSFromYAML::openFileForRead(const Twine &Path, if (!F->useExternalName(UseExternalNames)) Result->setName(Path.str()); - return error_code::success(); + return error_code(); } IntrusiveRefCntPtr<FileSystem> diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 7d0e102d630278857a23af598b7113fde8863273..ba87b87dd0d46e04e4dda73d7b95f7617dbd1004 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -482,7 +482,7 @@ llvm::error_code parseConfiguration(StringRef Text, FormatStyle *Style) { Styles[i].Language == FormatStyle::LK_None) { *Style = Styles[i]; Style->Language = Language; - return llvm::error_code::success(); + return llvm::error_code(); } } return llvm::make_error_code(llvm::errc::not_supported); diff --git a/lib/Frontend/FrontendActions.cpp b/lib/Frontend/FrontendActions.cpp index 5c56ee399c1b6f418cdef6b0bbb41542533076db..a783ca19d6ef75f59376e4fbd49d75ed5cb66962 100644 --- a/lib/Frontend/FrontendActions.cpp +++ b/lib/Frontend/FrontendActions.cpp @@ -153,7 +153,7 @@ static llvm::error_code addHeaderInclude(StringRef HeaderName, Includes += "\"\n"; if (IsExternC && LangOpts.CPlusPlus) Includes += "}\n"; - return llvm::error_code::success(); + return llvm::error_code(); } static llvm::error_code addHeaderInclude(const FileEntry *Header, @@ -176,7 +176,7 @@ collectModuleHeaderIncludes(const LangOptions &LangOpts, FileManager &FileMgr, SmallVectorImpl<char> &Includes) { // Don't collect any headers for unavailable modules. if (!Module->isAvailable()) - return llvm::error_code::success(); + return llvm::error_code(); // Add includes for each of these headers. for (unsigned I = 0, N = Module->NormalHeaders.size(); I != N; ++I) { @@ -237,7 +237,7 @@ collectModuleHeaderIncludes(const LangOptions &LangOpts, FileManager &FileMgr, LangOpts, FileMgr, ModMap, *Sub, Includes)) return Err; - return llvm::error_code::success(); + return llvm::error_code(); } bool GenerateModuleAction::BeginSourceFileAction(CompilerInstance &CI, @@ -310,7 +310,7 @@ bool GenerateModuleAction::BeginSourceFileAction(CompilerInstance &CI, // Collect the set of #includes we need to build the module. SmallString<256> HeaderContents; - llvm::error_code Err = llvm::error_code::success(); + llvm::error_code Err = llvm::error_code(); if (const FileEntry *UmbrellaHeader = Module->getUmbrellaHeader()) Err = addHeaderInclude(UmbrellaHeader, HeaderContents, CI.getLangOpts(), Module->IsExternC);