summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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