[lld] r209948 - Use error_code() instead of error_code::succes()

Rafael Espindola rafael.espindola at gmail.com
Fri May 30 18:22:22 PDT 2014


Author: rafael
Date: Fri May 30 20:22:21 2014
New Revision: 209948

URL: http://llvm.org/viewvc/llvm-project?rev=209948&view=rev
Log:
Use error_code() instead of error_code::succes()

There is no std::error_code::success, so this removes much of the noise
in transitioning to std::error_code.

Modified:
    lld/trunk/include/lld/Core/InputGraph.h
    lld/trunk/include/lld/Driver/DarwinInputGraph.h
    lld/trunk/lib/Core/InputGraph.cpp
    lld/trunk/lib/Core/PassManager.cpp
    lld/trunk/lib/Driver/GnuLdDriver.cpp
    lld/trunk/lib/Driver/GnuLdInputGraph.cpp
    lld/trunk/lib/Driver/WinLinkInputGraph.cpp
    lld/trunk/lib/ReaderWriter/ELF/ELFFile.h
    lld/trunk/lib/ReaderWriter/ELF/ELFReader.h
    lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h
    lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h
    lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h
    lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp
    lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp
    lld/trunk/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h
    lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h
    lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFReader.h
    lld/trunk/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h
    lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp
    lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h
    lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFReader.h
    lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.cpp
    lld/trunk/lib/ReaderWriter/ELF/X86/X86TargetHandler.cpp
    lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp
    lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp
    lld/trunk/lib/ReaderWriter/FileArchive.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
    lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp
    lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp
    lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h
    lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
    lld/trunk/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp
    lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp

Modified: lld/trunk/include/lld/Core/InputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/InputGraph.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/include/lld/Core/InputGraph.h (original)
+++ lld/trunk/include/lld/Core/InputGraph.h Fri May 30 20:22:21 2014
@@ -188,7 +188,7 @@ public:
     for (std::unique_ptr<InputElement> &ei : _elements)
       if (error_code ec = ei->parse(ctx, diag))
         return ec;
-    return error_code::success();
+    return error_code();
   }
 
   /// If Resolver made a progress using the current file, it's ok to revisit
@@ -290,7 +290,7 @@ public:
 
   /// \brief parse the input element
   error_code parse(const LinkingContext &, raw_ostream &) override {
-    return error_code::success();
+    return error_code();
   }
 
   /// \brief Return the next File thats part of this node to the

Modified: lld/trunk/include/lld/Driver/DarwinInputGraph.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Driver/DarwinInputGraph.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/include/lld/Driver/DarwinInputGraph.h (original)
+++ lld/trunk/include/lld/Driver/DarwinInputGraph.h Fri May 30 20:22:21 2014
@@ -58,7 +58,7 @@ public:
       } else {
         // if --whole-archive is around non-archive, just use it as normal.
         _files.push_back(std::move(f));
-        return error_code::success();
+        return error_code();
       }
     }
     return ctx.registry().parseFile(_buffer, _files);

Modified: lld/trunk/lib/Core/InputGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/InputGraph.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/Core/InputGraph.cpp (original)
+++ lld/trunk/lib/Core/InputGraph.cpp Fri May 30 20:22:21 2014
@@ -90,7 +90,7 @@ error_code FileNode::getBuffer(StringRef
   if (error_code ec = MemoryBuffer::getFileOrSTDIN(filePath, mb))
     return ec;
   _buffer = std::move(mb);
-  return error_code::success();
+  return error_code();
 }
 
 /// \brief Return the next file that need to be processed by the resolver.

Modified: lld/trunk/lib/Core/PassManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/PassManager.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/Core/PassManager.cpp (original)
+++ lld/trunk/lib/Core/PassManager.cpp Fri May 30 20:22:21 2014
@@ -18,6 +18,6 @@ namespace lld {
 error_code PassManager::runOnFile(std::unique_ptr<MutableFile> &mf) {
   for (std::unique_ptr<Pass> &pass : _passes)
     pass->perform(mf);
-  return error_code::success();
+  return error_code();
 }
 } // end namespace lld

Modified: lld/trunk/lib/Driver/GnuLdDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdDriver.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/Driver/GnuLdDriver.cpp (original)
+++ lld/trunk/lib/Driver/GnuLdDriver.cpp Fri May 30 20:22:21 2014
@@ -122,7 +122,7 @@ static error_code getFileMagic(ELFLinkin
   case llvm::sys::fs::file_magic::elf_relocatable:
   case llvm::sys::fs::file_magic::elf_shared_object:
   case llvm::sys::fs::file_magic::unknown:
-    return error_code::success();
+    return error_code();
   default:
     break;
   }

Modified: lld/trunk/lib/Driver/GnuLdInputGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/GnuLdInputGraph.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/Driver/GnuLdInputGraph.cpp (original)
+++ lld/trunk/lib/Driver/GnuLdInputGraph.cpp Fri May 30 20:22:21 2014
@@ -41,7 +41,7 @@ error_code ELFFileNode::parse(const Link
     }
     // if --whole-archive is around non-archive, just use it as normal.
     _files.push_back(std::move(f));
-    return error_code::success();
+    return error_code();
   }
   return ctx.registry().parseFile(_buffer, _files);
 }
@@ -66,7 +66,7 @@ error_code GNULdScript::parse(const Link
   if (!_linkerScript)
     return LinkerScriptReaderError::parse_error;
 
-  return error_code::success();
+  return error_code();
 }
 
 static bool isPathUnderSysroot(StringRef sysroot, StringRef path) {
@@ -106,5 +106,5 @@ error_code ELFGNULdScript::parse(const L
     }
     _expandElements.push_back(std::move(groupStart));
   }
-  return error_code::success();
+  return error_code();
 }

Modified: lld/trunk/lib/Driver/WinLinkInputGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/WinLinkInputGraph.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/Driver/WinLinkInputGraph.cpp (original)
+++ lld/trunk/lib/Driver/WinLinkInputGraph.cpp Fri May 30 20:22:21 2014
@@ -19,7 +19,7 @@ bool isCOFFLibraryFileExtension(StringRe
 error_code PECOFFFileNode::parse(const LinkingContext &ctx,
                                  raw_ostream &diagnostics) {
   if (_parsed)
-    return error_code::success();
+    return error_code();
   _parsed = true;
   ErrorOr<StringRef> filePath = getPath(ctx);
   if (error_code ec = filePath.getError()) {

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFFile.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFFile.h Fri May 30 20:22:21 2014
@@ -509,7 +509,7 @@ template <class ELFT> error_code ELFFile
     }
   }
   _references.reserve(totalRelocs);
-  return error_code::success();
+  return error_code();
 }
 
 template <class ELFT> error_code ELFFile<ELFT>::createMergeableAtoms() {
@@ -550,7 +550,7 @@ template <class ELFT> error_code ELFFile
     _definedAtoms._atoms.push_back(*mergeAtom);
     _mergeAtoms.push_back(*mergeAtom);
   }
-  return error_code::success();
+  return error_code();
 }
 
 template <class ELFT>
@@ -594,7 +594,7 @@ error_code ELFFile<ELFT>::createSymbolsF
     }
   }
 
-  return error_code::success();
+  return error_code();
 }
 
 template <class ELFT> error_code ELFFile<ELFT>::createAtoms() {
@@ -736,7 +736,7 @@ template <class ELFT> error_code ELFFile
   }
 
   updateReferences();
-  return error_code::success();
+  return error_code();
 }
 
 template <class ELFT>

Modified: lld/trunk/lib/ReaderWriter/ELF/ELFReader.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFReader.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/ELFReader.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/ELFReader.h Fri May 30 20:22:21 2014
@@ -59,7 +59,7 @@ public:
     if (error_code ec = f.getError())
       return ec;
     result.push_back(std::move(*f));
-    return error_code::success();
+    return error_code();
   }
 
 protected:
@@ -86,7 +86,7 @@ public:
     if (error_code ec = f.getError())
       return ec;
     result.push_back(std::move(*f));
-    return error_code::success();
+    return error_code();
   }
 
 protected:

Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h Fri May 30 20:22:21 2014
@@ -34,7 +34,7 @@ protected:
   virtual error_code setELFHeader() {
     DynamicLibraryWriter<ELFT>::setELFHeader();
     HexagonELFWriter<ELFT>::setELFHeader(*this->_elfHeader);
-    return error_code::success();
+    return error_code();
   }
 
 private:

Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h Fri May 30 20:22:21 2014
@@ -54,7 +54,7 @@ public:
     if (error_code ec = f.getError())
       return ec;
     result.push_back(std::move(*f));
-    return error_code::success();
+    return error_code();
   }
 };
 
@@ -73,7 +73,7 @@ public:
     if (error_code ec = f.getError())
       return ec;
     result.push_back(std::move(*f));
-    return error_code::success();
+    return error_code();
   }
 };
 

Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h Fri May 30 20:22:21 2014
@@ -35,7 +35,7 @@ protected:
   virtual error_code setELFHeader() {
     ExecutableWriter<ELFT>::setELFHeader();
     HexagonELFWriter<ELFT>::setELFHeader(*this->_elfHeader);
-    return error_code::success();
+    return error_code();
   }
 
 private:

Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp Fri May 30 20:22:21 2014
@@ -220,7 +220,7 @@ error_code HexagonTargetRelocationHandle
   uint64_t relocVAddress = atom._virtualAddr + ref.offsetInAtom();
 
   if (ref.kindNamespace() != Reference::KindNamespace::ELF)
-    return error_code::success();
+    return error_code();
   assert(ref.kindArch() == Reference::KindArch::Hexagon);
   switch (ref.kindValue()) {
   case R_HEX_B22_PCREL:
@@ -353,7 +353,7 @@ error_code HexagonTargetRelocationHandle
   }
   }
 
-  return error_code::success();
+  return error_code();
 }
 
 

Modified: lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp Fri May 30 20:22:21 2014
@@ -304,7 +304,7 @@ public:
   error_code handleGOTREL(const Reference &ref) {
     // Turn this so that the target is set to the GOT entry
     const_cast<Reference &>(ref).setTarget(getGOTEntry(ref.target()));
-    return error_code::success();
+    return error_code();
   }
 
   error_code handlePLT32(const Reference &ref) {
@@ -313,7 +313,7 @@ public:
     assert(ref.kindArch() == Reference::KindArch::Hexagon);
     const_cast<Reference &>(ref).setKindValue(R_HEX_B22_PCREL);
     const_cast<Reference &>(ref).setTarget(getPLTEntry(ref.target()));
-    return error_code::success();
+    return error_code();
   }
 };
 

Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsDynamicLibraryWriter.h Fri May 30 20:22:21 2014
@@ -34,7 +34,7 @@ protected:
   error_code setELFHeader() override {
     DynamicLibraryWriter<ELFT>::setELFHeader();
     _writeHelper.setELFHeader(*this->_elfHeader);
-    return error_code::success();
+    return error_code();
   }
 
   LLD_UNIQUE_BUMP_PTR(DynamicTable<ELFT>) createDynamicTable();

Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFFile.h Fri May 30 20:22:21 2014
@@ -158,7 +158,7 @@ private:
       } else if (!_tpOff.hasValue() && section.sh_flags & llvm::ELF::SHF_TLS)
         _tpOff = section.sh_addr + TP_OFFSET;
     }
-    return error_code::success();
+    return error_code();
   }
 
   void createRelocationReferences(const Elf_Sym &symbol,

Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFReader.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFReader.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFReader.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsELFReader.h Fri May 30 20:22:21 2014
@@ -40,7 +40,7 @@ public:
     if (error_code ec = f.getError())
       return ec;
     result.push_back(std::move(*f));
-    return error_code::success();
+    return error_code();
   }
 };
 

Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsExecutableWriter.h Fri May 30 20:22:21 2014
@@ -36,7 +36,7 @@ protected:
   error_code setELFHeader() override {
     ExecutableWriter<ELFT>::setELFHeader();
     _writeHelper.setELFHeader(*this->_elfHeader);
-    return error_code::success();
+    return error_code();
   }
 
   LLD_UNIQUE_BUMP_PTR(DynamicTable<ELFT>) createDynamicTable();

Modified: lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/Mips/MipsRelocationHandler.cpp Fri May 30 20:22:21 2014
@@ -123,7 +123,7 @@ error_code MipsTargetRelocationHandler::
     ELFWriter &writer, llvm::FileOutputBuffer &buf, const lld::AtomLayout &atom,
     const Reference &ref) const {
   if (ref.kindNamespace() != lld::Reference::KindNamespace::ELF)
-    return error_code::success();
+    return error_code();
   assert(ref.kindArch() == Reference::KindArch::Mips);
 
   AtomLayout *gpAtom = _mipsTargetLayout.getGP();
@@ -204,5 +204,5 @@ error_code MipsTargetRelocationHandler::
   }
   }
 
-  return error_code::success();
+  return error_code();
 }

Modified: lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/OutputELFWriter.h Fri May 30 20:22:21 2014
@@ -394,7 +394,7 @@ error_code OutputELFWriter<ELFT>::buildO
   if (_context.isDynamic())
     _dynamicTable->updateDynamicTable();
 
-  return error_code::success();
+  return error_code();
 }
 
 template <class ELFT> error_code OutputELFWriter<ELFT>::setELFHeader() {
@@ -419,7 +419,7 @@ template <class ELFT> error_code OutputE
   _layout.findAtomAddrByName(_context.entrySymbolName(), virtualAddr);
   _elfHeader->e_entry(virtualAddr);
 
-  return error_code::success();
+  return error_code();
 }
 
 template <class ELFT> uint64_t OutputELFWriter<ELFT>::outputFileSize() const {

Modified: lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFReader.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFReader.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFReader.h (original)
+++ lld/trunk/lib/ReaderWriter/ELF/PPC/PPCELFReader.h Fri May 30 20:22:21 2014
@@ -52,7 +52,7 @@ public:
     if (!f)
       return f;
     result.push_back(std::move(*f));
-    return error_code::success();
+    return error_code();
   }
 };
 
@@ -71,7 +71,7 @@ public:
     if (!f)
       return f;
     result.push_back(std::move(*f));
-    return error_code::success();
+    return error_code();
   }
 };
 

Modified: lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/PPC/PPCTargetHandler.cpp Fri May 30 20:22:21 2014
@@ -44,7 +44,7 @@ error_code PPCTargetRelocationHandler::a
   uint64_t relocVAddress = atom._virtualAddr + ref.offsetInAtom();
 
   if (ref.kindNamespace() != Reference::KindNamespace::ELF)
-    return error_code::success();
+    return error_code();
   assert(ref.kindArch() == Reference::KindArch::PowerPC);
   switch (ref.kindValue()) {
   case R_PPC_REL24:
@@ -60,7 +60,7 @@ error_code PPCTargetRelocationHandler::a
   }
   }
 
-  return error_code::success();
+  return error_code();
 }
 
 PPCTargetHandler::PPCTargetHandler(PPCLinkingContext &context)

Modified: lld/trunk/lib/ReaderWriter/ELF/X86/X86TargetHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86/X86TargetHandler.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86/X86TargetHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86/X86TargetHandler.cpp Fri May 30 20:22:21 2014
@@ -105,7 +105,7 @@ error_code X86TargetRelocationHandler::a
   uint64_t relocVAddress = atom._virtualAddr + ref.offsetInAtom();
 
   if (ref.kindNamespace() != Reference::KindNamespace::ELF)
-    return error_code::success();
+    return error_code();
   assert(ref.kindArch() == Reference::KindArch::x86);
   switch (ref.kindValue()) {
   case R_386_32:
@@ -123,7 +123,7 @@ error_code X86TargetRelocationHandler::a
   }
   }
 
-  return error_code::success();
+  return error_code();
 }
 
 X86TargetHandler::X86TargetHandler(X86LinkingContext &context)

Modified: lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationHandler.cpp Fri May 30 20:22:21 2014
@@ -69,7 +69,7 @@ error_code X86_64TargetRelocationHandler
   uint64_t relocVAddress = atom._virtualAddr + ref.offsetInAtom();
 
   if (ref.kindNamespace() != Reference::KindNamespace::ELF)
-    return error_code::success();
+    return error_code();
   assert(ref.kindArch() == Reference::KindArch::x86_64);
   switch (ref.kindValue()) {
   case R_X86_64_NONE:
@@ -140,5 +140,5 @@ error_code X86_64TargetRelocationHandler
   }
   }
 
-  return error_code::success();
+  return error_code();
 }

Modified: lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp (original)
+++ lld/trunk/lib/ReaderWriter/ELF/X86_64/X86_64RelocationPass.cpp Fri May 30 20:22:21 2014
@@ -153,7 +153,7 @@ protected:
     auto target = dyn_cast_or_null<const DefinedAtom>(ref.target());
     if (target && target->contentType() == DefinedAtom::typeResolver)
       const_cast<Reference &>(ref).setTarget(getIFUNCPLTEntry(target));
-    return error_code::success();
+    return error_code();
   }
 
   /// \brief Create a GOT entry for the TP offset of a TLS atom.
@@ -306,7 +306,7 @@ public:
     // __tls_get_addr is handled elsewhere.
     if (ref.target() && ref.target()->name() == "__tls_get_addr") {
       const_cast<Reference &>(ref).setKindValue(R_X86_64_NONE);
-      return error_code::success();
+      return error_code();
     }
     // Static code doesn't need PLTs.
     const_cast<Reference &>(ref).setKindValue(R_X86_64_PC32);
@@ -315,7 +315,7 @@ public:
             dyn_cast_or_null<const DefinedAtom>(ref.target()))
       if (da->contentType() == DefinedAtom::typeResolver)
         return handleIFUNC(ref);
-    return error_code::success();
+    return error_code();
   }
 
   error_code handleGOT(const Reference &ref) {
@@ -323,7 +323,7 @@ public:
       const_cast<Reference &>(ref).setTarget(getNullGOT());
     else if (const DefinedAtom *da = dyn_cast<const DefinedAtom>(ref.target()))
       const_cast<Reference &>(ref).setTarget(getGOT(da));
-    return error_code::success();
+    return error_code();
   }
 };
 
@@ -395,7 +395,7 @@ public:
 
   error_code handlePlain(const Reference &ref) {
     if (!ref.target())
-      return error_code::success();
+      return error_code();
     if (auto sla = dyn_cast<SharedLibraryAtom>(ref.target())) {
       if (sla->type() == SharedLibraryAtom::Type::Data)
         const_cast<Reference &>(ref).setTarget(getObjectEntry(sla));
@@ -403,7 +403,7 @@ public:
         const_cast<Reference &>(ref).setTarget(getPLTEntry(sla));
     } else
       return handleIFUNC(ref);
-    return error_code::success();
+    return error_code();
   }
 
   error_code handlePLT32(const Reference &ref) {
@@ -416,7 +416,7 @@ public:
         return handleIFUNC(ref);
     if (isa<const SharedLibraryAtom>(ref.target()))
       const_cast<Reference &>(ref).setTarget(getPLTEntry(ref.target()));
-    return error_code::success();
+    return error_code();
   }
 
   const GOTAtom *getSharedGOT(const SharedLibraryAtom *sla) {
@@ -442,7 +442,7 @@ public:
       const_cast<Reference &>(ref).setTarget(getGOT(da));
     else if (const auto sla = dyn_cast<const SharedLibraryAtom>(ref.target()))
       const_cast<Reference &>(ref).setTarget(getSharedGOT(sla));
-    return error_code::success();
+    return error_code();
   }
 };
 } // end anon namespace

Modified: lld/trunk/lib/ReaderWriter/FileArchive.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/FileArchive.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/FileArchive.cpp (original)
+++ lld/trunk/lib/ReaderWriter/FileArchive.cpp Fri May 30 20:22:21 2014
@@ -78,7 +78,7 @@ public:
       if (error_code ec = instantiateMember(mf, result))
         return ec;
     }
-    return error_code::success();
+    return error_code();
   }
 
   const atom_collection<DefinedAtom> &defined() const override {
@@ -117,7 +117,7 @@ protected:
     _registry.parseFile(mb, result);
     const char *memberStart = member->getBuffer().data();
     _membersInstantiated.insert(memberStart);
-    return error_code::success();
+    return error_code();
   }
 
   error_code isDataSymbol(std::unique_ptr<MemoryBuffer> mb, StringRef symbol) const {
@@ -152,7 +152,7 @@ protected:
         return ec;
 
       if (symtype == SymbolRef::ST_Data) {
-        return error_code::success();
+        return error_code();
       }
     }
     return object_error::parse_failed;
@@ -199,7 +199,7 @@ public:
                        << "'" << name << "'\n");
       _symbolMemberMap[name] = member;
     }
-    return error_code::success();
+    return error_code();
   }
 
 }; // class FileArchive
@@ -233,7 +233,7 @@ public:
     mb.release();
 
     result.push_back(std::move(file));
-    return error_code::success();
+    return error_code();
   }
 
 private:

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp Fri May 30 20:22:21 2014
@@ -68,12 +68,12 @@ forEachLoadCommand(StringRef lcRange, un
       return llvm::make_error_code(llvm::errc::executable_format_error);
 
     if (func(slc->cmd, slc->cmdsize, p))
-      return error_code::success();
+      return error_code();
 
     p += slc->cmdsize;
   }
 
-  return error_code::success();
+  return error_code();
 }
 
 
@@ -88,7 +88,7 @@ appendRelocations(Relocations &relocs, S
   for(uint32_t i=0; i < nreloc; ++i) {
     relocs.push_back(unpackRelocation(relocsArray[i], swap, bigEndian));
   }
-  return error_code::success();
+  return error_code();
 }
 
 static error_code
@@ -105,7 +105,7 @@ appendIndirectSymbols(IndirectSymbols &i
   for(uint32_t i=0; i < count; ++i) {
     isyms.push_back(read32(swap, indirectSymbolArray[startIndex+i]));
   }
-  return error_code::success();
+  return error_code();
 }
 
 
@@ -426,7 +426,7 @@ public:
 
     result.push_back(std::move(*file));
 
-    return error_code::success();
+    return error_code();
   }
 private:
   MachOLinkingContext::Arch _arch;

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp Fri May 30 20:22:21 2014
@@ -524,7 +524,7 @@ error_code MachOFileLayout::writeSingleS
     ++sout;
   }
   lc = next;
-  return error_code::success();
+  return error_code();
 }
 
 
@@ -587,7 +587,7 @@ error_code MachOFileLayout::writeSegment
   if (_swap)
     swapStruct(*cmd);
   lc = next;
-  return error_code::success();
+  return error_code();
 }
 
 
@@ -954,7 +954,7 @@ error_code MachOFileLayout::writeBinary(
   writeLinkEditContent();
   fob->commit();
 
-  return error_code::success();
+  return error_code();
 }
 
 

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp Fri May 30 20:22:21 2014
@@ -120,7 +120,7 @@ processSymbol(const NormalizedFile &norm
   case symbolsOk:
     break;
   case symbolsIgnored:
-    return error_code::success();
+    return error_code();
     break;
   case symbolsIllegal:
     return make_dynamic_error_code(Twine("Symbol '") + sym.name
@@ -155,7 +155,7 @@ processSymbol(const NormalizedFile &norm
                         copyRefs);
     }
   }
-  return error_code::success();
+  return error_code();
 }
 
 
@@ -198,7 +198,7 @@ static error_code processUTF16Section(Ma
                                    "last string in the section is not zero "
                                    "terminated.");
   }
-  return error_code::success();
+  return error_code();
 }
 
 // A __DATA/__cfstring section contain NS/CFString objects. Atom boundaries
@@ -220,7 +220,7 @@ static error_code processCFStringSection
                         DefinedAtom::mergeByContent, byteContent, copyRefs);
     offset += cfsObjSize;
   }
-  return error_code::success();
+  return error_code();
 }
 
 
@@ -254,7 +254,7 @@ static error_code processCFISection(Mach
                         bytes, copyRefs);
     offset += len;
   }
-  return error_code::success();
+  return error_code();
 }
 
 static error_code 
@@ -275,7 +275,7 @@ processCompactUnwindSection(MachOFile &f
                         DefinedAtom::mergeNo, byteContent, copyRefs);
     offset += cuObjSize;
   }
-  return error_code::success();
+  return error_code();
 }
 
 static error_code processSection(MachOFile &file, const Section &section,
@@ -437,7 +437,7 @@ static error_code processSection(MachOFi
     llvm_unreachable("mach-o section type not supported yet");
     break;
   }
-  return error_code::success();
+  return error_code();
 }
 
 static ErrorOr<std::unique_ptr<lld::File>>

Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp Fri May 30 20:22:21 2014
@@ -706,7 +706,7 @@ writeYaml(const NormalizedFile &file, ra
   // Stream out yaml.
   yout << *f;
 
-  return error_code::success();
+  return error_code();
 }
 
 } // namespace normalized

Modified: lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp (original)
+++ lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp Fri May 30 20:22:21 2014
@@ -1009,7 +1009,7 @@ public:
   parseFile(std::unique_ptr<MemoryBuffer> &mb, const class Registry &,
             std::vector<std::unique_ptr<File>> &result) const override {
     return lld::native::File::make(std::move(mb), result);
-    return error_code::success();
+    return error_code();
   }
 };
 }

Modified: lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp (original)
+++ lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp Fri May 30 20:22:21 2014
@@ -73,11 +73,11 @@ public:
     llvm::raw_fd_ostream out(outPath.data(), errorInfo,
                              llvm::sys::fs::F_None);
     if (!errorInfo.empty())
-      return error_code::success(); // FIXME
+      return error_code(); // FIXME
 
     this->write(out);
 
-    return error_code::success();
+    return error_code();
   }
 
   virtual ~Writer() {

Modified: lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/LinkerGeneratedSymbolFile.h Fri May 30 20:22:21 2014
@@ -78,7 +78,7 @@ public:
 
   error_code
   parseAllMembers(std::vector<std::unique_ptr<File>> &result) const override {
-    return error_code::success();
+    return error_code();
   }
 
 private:

Modified: lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp Fri May 30 20:22:21 2014
@@ -318,7 +318,7 @@ error_code FileCOFF::parse() {
     return ec;
   if (error_code ec = maybeCreateSXDataAtoms())
     return ec;
-  return error_code::success();
+  return error_code();
 }
 
 /// Iterate over the symbol table to retrieve all symbols.
@@ -364,7 +364,7 @@ error_code FileCOFF::readSymbolTable(vec
  next:
       i += sym->NumberOfAuxSymbols;
   }
-  return error_code::success();
+  return error_code();
 }
 
 /// Create atoms for the absolute symbols.
@@ -436,7 +436,7 @@ FileCOFF::createUndefinedAtoms(const Sym
     result.push_back(atom);
     _symbolAtom[sym] = atom;
   }
-  return error_code::success();
+  return error_code();
 }
 
 /// Create atoms for the defined symbols. This pass is a bit complicated than
@@ -526,7 +526,7 @@ error_code FileCOFF::createDefinedSymbol
   if (error_code ec = AtomizeDefinedSymbols(definedSymbols, result))
     return ec;
 
-  return error_code::success();
+  return error_code();
 }
 
 // Cache the COMDAT attributes, which indicate whether the symbols in the
@@ -567,7 +567,7 @@ error_code FileCOFF::cacheSectionAttribu
     if (!_merge.count(sec))
       _merge[sec] = DefinedAtom::mergeNo;
   }
-  return error_code::success();
+  return error_code();
 }
 
 /// Atomize \p symbols and append the results to \p atoms. The symbols are
@@ -603,7 +603,7 @@ FileCOFF::AtomizeDefinedSymbolsInSection
       atoms.push_back(atom);
       _symbolAtom[sym] = atom;
     }
-    return error_code::success();
+    return error_code();
   }
 
   ArrayRef<uint8_t> secData;
@@ -614,7 +614,7 @@ FileCOFF::AtomizeDefinedSymbolsInSection
   // a part of the output image. That's what the COFF spec says.
   if (section->Characteristics & llvm::COFF::IMAGE_SCN_LNK_INFO ||
       section->Characteristics & llvm::COFF::IMAGE_SCN_LNK_REMOVE)
-    return error_code::success();
+    return error_code();
 
   // Supporting debug info needs more work than just linking and combining
   // .debug sections. We don't support it yet. Let's discard .debug sections at
@@ -622,7 +622,7 @@ FileCOFF::AtomizeDefinedSymbolsInSection
   // blobs that nobody would understand.
   if ((section->Characteristics & llvm::COFF::IMAGE_SCN_MEM_DISCARDABLE) &&
       (sectionName == ".debug" || sectionName.startswith(".debug$"))) {
-    return error_code::success();
+    return error_code();
   }
 
   DefinedAtom::ContentType type = getContentType(section);
@@ -637,7 +637,7 @@ FileCOFF::AtomizeDefinedSymbolsInSection
         perms, _merge[section], data, _ordinal++);
     atoms.push_back(atom);
     _definedAtomLocations[section][0].push_back(atom);
-    return error_code::success();
+    return error_code();
   }
 
   // Create an unnamed atom if the first atom isn't at the start of the
@@ -669,7 +669,7 @@ FileCOFF::AtomizeDefinedSymbolsInSection
   // Finally, set alignment to the first atom so that the section contents
   // will be aligned as specified by the object section header.
   _definedAtomLocations[section][0][0]->setAlignment(getAlignment(section));
-  return error_code::success();
+  return error_code();
 }
 
 error_code
@@ -692,7 +692,7 @@ FileCOFF::AtomizeDefinedSymbols(SectionT
       definedAtoms.push_back(atom);
     }
   }
-  return error_code::success();
+  return error_code();
 }
 
 /// Find the atom that is at \p targetAddress in \p section.
@@ -708,7 +708,7 @@ error_code FileCOFF::findAtomAt(const co
         targetAddress < atomAddress + atom->size()) {
       result = atom;
       offsetInAtom = targetAddress - atomAddress;
-      return error_code::success();
+      return error_code();
     }
   }
   // Relocation target is out of range
@@ -723,7 +723,7 @@ error_code FileCOFF::getAtomBySymbolInde
     return ec;
   ret = _symbolAtom[symbol];
   assert(ret);
-  return error_code::success();
+  return error_code();
 }
 
 /// Add relocation information to an atom based on \p rel. \p rel is an
@@ -751,7 +751,7 @@ FileCOFF::addRelocationReference(const c
       new COFFReference(targetAtom, offsetInAtom, rel->Type,
                         Reference::KindNamespace::COFF,
                         _referenceArch)));
-  return error_code::success();
+  return error_code();
 }
 
 // Read section contents.
@@ -761,10 +761,10 @@ error_code FileCOFF::getSectionContents(
   if (error_code ec = findSection(sectionName, section))
     return ec;
   if (!section)
-    return error_code::success();
+    return error_code();
   if (error_code ec = _obj->getSectionContents(section, result))
     return ec;
-  return error_code::success();
+  return error_code();
 }
 
 /// Returns the target machine type of the current object file.
@@ -775,13 +775,13 @@ error_code FileCOFF::getReferenceArch(Re
   switch (header->Machine) {
   case llvm::COFF::IMAGE_FILE_MACHINE_I386:
     result = Reference::KindArch::x86;
-    return error_code::success();
+    return error_code();
   case llvm::COFF::IMAGE_FILE_MACHINE_AMD64:
     result = Reference::KindArch::x86_64;
-    return error_code::success();
+    return error_code();
   case llvm::COFF::IMAGE_FILE_MACHINE_UNKNOWN:
     result = Reference::KindArch::all;
-    return error_code::success();
+    return error_code();
   }
   llvm::errs() << "Unsupported machine type: " << header->Machine << "\n";
   return llvm::object::object_error::parse_failed;
@@ -806,7 +806,7 @@ error_code FileCOFF::addRelocationRefere
         return ec;
     }
   }
-  return error_code::success();
+  return error_code();
 }
 
 // Read .sxdata section if exists. .sxdata is a x86-only section that contains a
@@ -827,7 +827,7 @@ error_code FileCOFF::maybeCreateSXDataAt
   if (error_code ec = getSectionContents(".sxdata", sxdata))
     return ec;
   if (sxdata.empty())
-    return error_code::success();
+    return error_code();
 
   std::vector<uint8_t> atomContent =
       *new (_alloc) std::vector<uint8_t>((size_t)sxdata.size());
@@ -851,7 +851,7 @@ error_code FileCOFF::maybeCreateSXDataAt
   }
 
   _definedAtoms._atoms.push_back(atom);
-  return error_code::success();
+  return error_code();
 }
 
 /// Find a section by name.
@@ -863,12 +863,12 @@ error_code FileCOFF::findSection(StringR
       return ec;
     if (sectionName == name) {
       result = section;
-      return error_code::success();
+      return error_code();
     }
   }
   // Section was not found, but it's not an error. This method returns
   // an error only when there's a read error.
-  return error_code::success();
+  return error_code();
 }
 
 // Convert ArrayRef<uint8_t> to std::string. The array contains a string which
@@ -931,7 +931,7 @@ public:
     if (error_code ec = file->parse())
       return ec;
     result.push_back(std::move(file));
-    return error_code::success();
+    return error_code();
   }
 
 private:
@@ -1048,7 +1048,7 @@ public:
     createAlternateNameAtoms(*file);
 
     result.push_back(std::move(file));
-    return error_code::success();
+    return error_code();
   }
 
 private:
@@ -1086,7 +1086,7 @@ private:
     if (!errorMessage.empty()) {
       llvm::errs() << "lld warning: " << errorMessage << "\n";
     }
-    return error_code::success();
+    return error_code();
   }
 
   AliasAtom *createAlias(FileCOFF &file, StringRef name,

Modified: lld/trunk/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderImportHeader.cpp Fri May 30 20:22:21 2014
@@ -211,7 +211,7 @@ public:
     if (type == llvm::COFF::IMPORT_CODE)
       addDefinedAtom(symbolName, dllName, dataAtom);
 
-    ec = error_code::success();
+    ec = error_code();
   }
 
   const atom_collection<DefinedAtom> &defined() const override {
@@ -307,7 +307,7 @@ public:
     if (ec)
       return ec;
     result.push_back(std::move(file));
-    return error_code::success();
+    return error_code();
   }
 };
 
@@ -331,7 +331,7 @@ error_code parseCOFFImportLibrary(const
   if (ec)
     return ec;
   result.push_back(std::move(file));
-  return error_code::success();
+  return error_code();
 }
 
 } // end namespace pecoff

Modified: lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp?rev=209948&r1=209947&r2=209948&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp (original)
+++ lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp Fri May 30 20:22:21 2014
@@ -663,7 +663,7 @@ template <> struct MappingTraits<const l
 
     virtual error_code
     parseAllMembers(std::vector<std::unique_ptr<File>> &result) const override {
-      return error_code::success();
+      return error_code();
     }
 
     StringRef               _path;
@@ -1308,7 +1308,7 @@ public:
     const lld::File *fileRef = &file;
     yout << fileRef;
 
-    return error_code::success();
+    return error_code();
   }
 
 private:





More information about the llvm-commits mailing list