summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-03-07 20:56:50 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-03-07 20:56:50 +0000
commitb654b556196b47382f800849ee4bc331e16f7f5a (patch)
tree9ab54b1b25047cd0e891185858f49e98f59b7c4a /llvm/lib/ExecutionEngine
parent57dd9bd5cc55ede780236ddd62af0a46f9d37734 (diff)
downloadbcm5719-llvm-b654b556196b47382f800849ee4bc331e16f7f5a.tar.gz
bcm5719-llvm-b654b556196b47382f800849ee4bc331e16f7f5a.zip
Fix unused variable/function warnings
llvm-svn: 231576
Diffstat (limited to 'llvm/lib/ExecutionEngine')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp4
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h12
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.cpp1
3 files changed, 7 insertions, 10 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp
index 4791f8776bd..56bcb8ee674 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp
@@ -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())
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
index 210ee47eb74..20c63f171a9 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
@@ -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;
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.cpp
index 342eb136494..9ea628a258e 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.cpp
@@ -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())
OpenPOWER on IntegriCloud