Don't return error_code from a function that doesn't fail.

llvm-svn: 241042
This commit is contained in:
Rafael Espindola
2015-06-30 04:08:37 +00:00
parent 8465c00762
commit 41bb43252b
11 changed files with 23 additions and 47 deletions

View File

@@ -1031,9 +1031,8 @@ COFFObjectFile::getRelocations(const coff_section *Sec) const {
Res = #reloc_type; \
break;
std::error_code
COFFObjectFile::getRelocationTypeName(DataRefImpl Rel,
SmallVectorImpl<char> &Result) const {
void COFFObjectFile::getRelocationTypeName(
DataRefImpl Rel, SmallVectorImpl<char> &Result) const {
const coff_relocation *Reloc = toRel(Rel);
StringRef Res;
switch (getMachine()) {
@@ -1102,7 +1101,6 @@ COFFObjectFile::getRelocationTypeName(DataRefImpl Rel,
Res = "Unknown";
}
Result.append(Res.begin(), Res.end());
return std::error_code();
}
#undef LLVM_COFF_SWITCH_RELOC_TYPE_NAME