summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-05-31 01:22:21 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-05-31 01:22:21 +0000
commit63ed1a35193abc706bd808931572b98e11502f25 (patch)
tree83544ec27f9e80f577a88508372a6df34f1b83bc /lld/lib/ReaderWriter/MachO
parent83f4192a478761eb9bfac50c9df4cf3173fcc136 (diff)
downloadbcm5719-llvm-63ed1a35193abc706bd808931572b98e11502f25.tar.gz
bcm5719-llvm-63ed1a35193abc706bd808931572b98e11502f25.zip
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. llvm-svn: 209948
Diffstat (limited to 'lld/lib/ReaderWriter/MachO')
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp10
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp6
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp14
-rw-r--r--lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp2
4 files changed, 16 insertions, 16 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
index bb1b5dd107d..ce10867c5b7 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryReader.cpp
@@ -68,12 +68,12 @@ forEachLoadCommand(StringRef lcRange, unsigned lcCount, bool swap, bool is64,
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, StringRef buffer, bool swap,
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 &isyms, StringRef buffer, bool swap,
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;
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
index 10123196a57..4a39a4bad27 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileBinaryWriter.cpp
@@ -524,7 +524,7 @@ error_code MachOFileLayout::writeSingleSegmentLoadCommand(uint8_t *&lc) {
++sout;
}
lc = next;
- return error_code::success();
+ return error_code();
}
@@ -587,7 +587,7 @@ error_code MachOFileLayout::writeSegmentLoadCommands(uint8_t *&lc) {
if (_swap)
swapStruct(*cmd);
lc = next;
- return error_code::success();
+ return error_code();
}
@@ -954,7 +954,7 @@ error_code MachOFileLayout::writeBinary(StringRef path) {
writeLinkEditContent();
fob->commit();
- return error_code::success();
+ return error_code();
}
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
index 4f2edbc4a45..a81c74be29b 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileToAtoms.cpp
@@ -120,7 +120,7 @@ processSymbol(const NormalizedFile &normalizedFile, MachOFile &file,
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 &normalizedFile, MachOFile &file,
copyRefs);
}
}
- return error_code::success();
+ return error_code();
}
@@ -198,7 +198,7 @@ static error_code processUTF16Section(MachOFile &file, const Section &section,
"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(MachOFile &file,const Section &section,
DefinedAtom::mergeByContent, byteContent, copyRefs);
offset += cfsObjSize;
}
- return error_code::success();
+ return error_code();
}
@@ -254,7 +254,7 @@ static error_code processCFISection(MachOFile &file, const Section &section,
bytes, copyRefs);
offset += len;
}
- return error_code::success();
+ return error_code();
}
static error_code
@@ -275,7 +275,7 @@ processCompactUnwindSection(MachOFile &file, const Section &section,
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(MachOFile &file, const Section &section,
llvm_unreachable("mach-o section type not supported yet");
break;
}
- return error_code::success();
+ return error_code();
}
static ErrorOr<std::unique_ptr<lld::File>>
diff --git a/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp b/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
index 4ce61fc9cb9..d792975dc71 100644
--- a/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
@@ -706,7 +706,7 @@ writeYaml(const NormalizedFile &file, raw_ostream &out) {
// Stream out yaml.
yout << *f;
- return error_code::success();
+ return error_code();
}
} // namespace normalized
OpenPOWER on IntegriCloud