Fix unused variable/function warnings

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231576 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Majnemer 2015-03-07 20:56:50 +00:00
parent 2c08439cf9
commit 0e7a2ca4b8
3 changed files with 7 additions and 10 deletions

View File

@ -60,7 +60,7 @@ RuntimeDyldCOFF::loadObject(const object::ObjectFile &O) {
uint64_t RuntimeDyldCOFF::getSymbolOffset(const SymbolRef &Sym) {
uint64_t Address;
if (std::error_code EC = Sym.getAddress(Address))
if (Sym.getAddress(Address))
return UnknownAddressOrSize;
if (Address == UnknownAddressOrSize)
@ -68,7 +68,7 @@ uint64_t RuntimeDyldCOFF::getSymbolOffset(const SymbolRef &Sym) {
const ObjectFile *Obj = Sym.getObject();
section_iterator SecI(Obj->section_end());
if (std::error_code EC = Sym.getSection(SecI))
if (Sym.getSection(SecI))
return UnknownAddressOrSize;
if (SecI == Obj->section_end())

View File

@ -36,15 +36,13 @@ using namespace llvm::object;
namespace llvm {
namespace {
// Helper for extensive error checking in debug builds.
std::error_code Check(std::error_code Err) {
if (Err) {
report_fatal_error(Err.message());
}
return Err;
inline std::error_code Check(std::error_code Err) {
if (Err) {
report_fatal_error(Err.message());
}
} // end anonymous namespace
return Err;
}
class Twine;

View File

@ -118,7 +118,6 @@ relocation_iterator RuntimeDyldCOFFX86_64::processRelocationRef(
report_fatal_error("Unknown symbol in relocation");
unsigned TargetSectionID = 0;
uint64_t TargetOffset = UnknownAddressOrSize;
const COFFObjectFile *COFFObj = cast<COFFObjectFile>(&Obj);
section_iterator SecI(Obj.section_end());
Symbol->getSection(SecI);
if (SecI == Obj.section_end())