From 41bb43252b18f9687990b2dd5c53c8270c785a62 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 30 Jun 2015 04:08:37 +0000 Subject: Don't return error_code from a function that doesn't fail. llvm-svn: 241042 --- llvm/lib/Object/COFFObjectFile.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Object/COFFObjectFile.cpp') diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp index 733fd49ad77..3babc210dd9 100644 --- a/llvm/lib/Object/COFFObjectFile.cpp +++ b/llvm/lib/Object/COFFObjectFile.cpp @@ -1031,9 +1031,8 @@ COFFObjectFile::getRelocations(const coff_section *Sec) const { Res = #reloc_type; \ break; -std::error_code -COFFObjectFile::getRelocationTypeName(DataRefImpl Rel, - SmallVectorImpl &Result) const { +void COFFObjectFile::getRelocationTypeName( + DataRefImpl Rel, SmallVectorImpl &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 -- cgit v1.2.3