summaryrefslogtreecommitdiff
path: root/lib/ReaderWriter/MachO/ArchHandler_x86.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ReaderWriter/MachO/ArchHandler_x86.cpp')
-rw-r--r--lib/ReaderWriter/MachO/ArchHandler_x86.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/lib/ReaderWriter/MachO/ArchHandler_x86.cpp b/lib/ReaderWriter/MachO/ArchHandler_x86.cpp
index 19c8780e707a..7aac2584d078 100644
--- a/lib/ReaderWriter/MachO/ArchHandler_x86.cpp
+++ b/lib/ReaderWriter/MachO/ArchHandler_x86.cpp
@@ -30,8 +30,8 @@ using llvm::support::little32_t;
class ArchHandler_x86 : public ArchHandler {
public:
- ArchHandler_x86();
- virtual ~ArchHandler_x86();
+ ArchHandler_x86() = default;
+ ~ArchHandler_x86() override = default;
const Registry::KindStrings *kindStrings() override { return _sKindStrings; }
@@ -49,9 +49,11 @@ public:
bool needsCompactUnwind() override {
return false;
}
+
Reference::KindValue imageOffsetKind() override {
return invalid;
}
+
Reference::KindValue imageOffsetKindIndirect() override {
return invalid;
}
@@ -68,7 +70,6 @@ public:
return invalid;
}
-
uint32_t dwarfCompactUnwindType() override {
return 0x04000000U;
}
@@ -169,10 +170,6 @@ private:
// ArchHandler_x86
//===----------------------------------------------------------------------===//
-ArchHandler_x86::ArchHandler_x86() {}
-
-ArchHandler_x86::~ArchHandler_x86() { }
-
const Registry::KindStrings ArchHandler_x86::_sKindStrings[] = {
LLD_KIND_STRING_ENTRY(invalid),
LLD_KIND_STRING_ENTRY(modeCode),
@@ -334,7 +331,7 @@ ArchHandler_x86::getReferenceInfo(const Relocation &reloc,
*addend = *(const ulittle32_t *)fixupContent - reloc.value;
break;
default:
- return make_dynamic_error_code(Twine("unsupported i386 relocation type"));
+ return make_dynamic_error_code("unsupported i386 relocation type");
}
return std::error_code();
}
@@ -376,8 +373,8 @@ ArchHandler_x86::getPairReferenceInfo(const normalized::Relocation &reloc1,
return ec;
if (fromTarget != inAtom) {
if (*target != inAtom)
- return make_dynamic_error_code(Twine("SECTDIFF relocation where "
- "neither target is in atom"));
+ return make_dynamic_error_code(
+ "SECTDIFF relocation where neither target is in atom");
*kind = negDelta32;
*addend = toAddress - value - fromAddress;
*target = fromTarget;
@@ -400,7 +397,7 @@ ArchHandler_x86::getPairReferenceInfo(const normalized::Relocation &reloc1,
return std::error_code();
break;
default:
- return make_dynamic_error_code(Twine("unsupported i386 relocation type"));
+ return make_dynamic_error_code("unsupported i386 relocation type");
}
}
@@ -545,7 +542,6 @@ bool ArchHandler_x86::useExternalRelocationTo(const Atom &target) {
return false;
}
-
void ArchHandler_x86::appendSectionRelocations(
const DefinedAtom &atom,
uint64_t atomSectionOffset,
@@ -633,7 +629,6 @@ void ArchHandler_x86::appendSectionRelocations(
}
}
-
std::unique_ptr<mach_o::ArchHandler> ArchHandler::create_x86() {
return std::unique_ptr<mach_o::ArchHandler>(new ArchHandler_x86());
}