summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/ELF/Hexagon
diff options
context:
space:
mode:
Diffstat (limited to 'lld/lib/ReaderWriter/ELF/Hexagon')
-rw-r--r--lld/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h4
-rw-r--r--lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h4
-rw-r--r--lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h12
-rw-r--r--lld/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h4
-rw-r--r--lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp6
-rw-r--r--lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h6
-rw-r--r--lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp8
7 files changed, 22 insertions, 22 deletions
diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h
index 34e517adb00..dccd5178c84 100644
--- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h
+++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonDynamicLibraryWriter.h
@@ -31,10 +31,10 @@ protected:
virtual void finalizeDefaultAtomValues();
- virtual error_code setELFHeader() {
+ virtual std::error_code setELFHeader() {
DynamicLibraryWriter<ELFT>::setELFHeader();
HexagonELFWriter<ELFT>::setELFHeader(*this->_elfHeader);
- return error_code();
+ return std::error_code();
}
private:
diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h
index 04de51553ee..5205d65f734 100644
--- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h
+++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFFile.h
@@ -118,12 +118,12 @@ public:
: ELFFile<ELFT>(name, atomizeStrings) {}
HexagonELFFile(std::unique_ptr<MemoryBuffer> mb, bool atomizeStrings,
- error_code &ec)
+ std::error_code &ec)
: ELFFile<ELFT>(std::move(mb), atomizeStrings, ec) {}
static ErrorOr<std::unique_ptr<HexagonELFFile>>
create(std::unique_ptr<MemoryBuffer> mb, bool atomizeStrings) {
- error_code ec;
+ std::error_code ec;
std::unique_ptr<HexagonELFFile<ELFT>> file(
new HexagonELFFile<ELFT>(mb->getBufferIdentifier(), atomizeStrings));
diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h
index d99a74f9d05..6bc6ee09cd8 100644
--- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h
+++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonELFReader.h
@@ -43,7 +43,7 @@ public:
HexagonELFObjectReader(bool atomizeStrings)
: ELFObjectReader(atomizeStrings) {}
- error_code
+ std::error_code
parseFile(std::unique_ptr<MemoryBuffer> &mb, const class Registry &,
std::vector<std::unique_ptr<File>> &result) const override {
std::size_t maxAlignment =
@@ -51,10 +51,10 @@ public:
auto f = createELF<HexagonELFFileCreateELFTraits>(
llvm::object::getElfArchType(&*mb), maxAlignment, std::move(mb),
_atomizeStrings);
- if (error_code ec = f.getError())
+ if (std::error_code ec = f.getError())
return ec;
result.push_back(std::move(*f));
- return error_code();
+ return std::error_code();
}
};
@@ -62,7 +62,7 @@ class HexagonELFDSOReader : public ELFDSOReader {
public:
HexagonELFDSOReader(bool useUndefines) : ELFDSOReader(useUndefines) {}
- error_code
+ std::error_code
parseFile(std::unique_ptr<MemoryBuffer> &mb, const class Registry &,
std::vector<std::unique_ptr<File>> &result) const override {
std::size_t maxAlignment =
@@ -70,10 +70,10 @@ public:
auto f = createELF<HexagonDynamicFileCreateELFTraits>(
llvm::object::getElfArchType(&*mb), maxAlignment, std::move(mb),
_useUndefines);
- if (error_code ec = f.getError())
+ if (std::error_code ec = f.getError())
return ec;
result.push_back(std::move(*f));
- return error_code();
+ return std::error_code();
}
};
diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h
index b00091a5e6b..2543aebf272 100644
--- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h
+++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonExecutableWriter.h
@@ -32,10 +32,10 @@ protected:
virtual void finalizeDefaultAtomValues();
- virtual error_code setELFHeader() {
+ virtual std::error_code setELFHeader() {
ExecutableWriter<ELFT>::setELFHeader();
HexagonELFWriter<ELFT>::setELFHeader(*this->_elfHeader);
- return error_code();
+ return std::error_code();
}
private:
diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp
index 89402eadf29..c7df3939c14 100644
--- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp
+++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.cpp
@@ -211,7 +211,7 @@ static int relocHexGOTREL_32(uint8_t *location, uint64_t P, uint64_t S,
return 0;
}
-error_code HexagonTargetRelocationHandler::applyRelocation(
+std::error_code HexagonTargetRelocationHandler::applyRelocation(
ELFWriter &writer, llvm::FileOutputBuffer &buf, const lld::AtomLayout &atom,
const Reference &ref) const {
uint8_t *atomContent = buf.getBufferStart() + atom._fileOffset;
@@ -220,7 +220,7 @@ error_code HexagonTargetRelocationHandler::applyRelocation(
uint64_t relocVAddress = atom._virtualAddr + ref.offsetInAtom();
if (ref.kindNamespace() != Reference::KindNamespace::ELF)
- return error_code();
+ return std::error_code();
assert(ref.kindArch() == Reference::KindArch::Hexagon);
switch (ref.kindValue()) {
case R_HEX_B22_PCREL:
@@ -353,7 +353,7 @@ error_code HexagonTargetRelocationHandler::applyRelocation(
}
}
- return error_code();
+ return std::error_code();
}
diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h
index 599b0a41491..905fc0ffe25 100644
--- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h
+++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonRelocationHandler.h
@@ -24,9 +24,9 @@ public:
HexagonTargetRelocationHandler(HexagonTargetLayout<HexagonELFType> &layout)
: _hexagonTargetLayout(layout) {}
- error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
- const lld::AtomLayout &,
- const Reference &) const override;
+ std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &,
+ const lld::AtomLayout &,
+ const Reference &) const override;
private:
HexagonTargetLayout<HexagonELFType> &_hexagonTargetLayout;
diff --git a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp
index 58f3f731609..7a732ed083d 100644
--- a/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp
+++ b/lld/lib/ReaderWriter/ELF/Hexagon/HexagonTargetHandler.cpp
@@ -301,19 +301,19 @@ public:
return ga;
}
- error_code handleGOTREL(const Reference &ref) {
+ std::error_code handleGOTREL(const Reference &ref) {
// Turn this so that the target is set to the GOT entry
const_cast<Reference &>(ref).setTarget(getGOTEntry(ref.target()));
- return error_code();
+ return std::error_code();
}
- error_code handlePLT32(const Reference &ref) {
+ std::error_code handlePLT32(const Reference &ref) {
// Turn this into a PC32 to the PLT entry.
assert(ref.kindNamespace() == Reference::KindNamespace::ELF);
assert(ref.kindArch() == Reference::KindArch::Hexagon);
const_cast<Reference &>(ref).setKindValue(R_HEX_B22_PCREL);
const_cast<Reference &>(ref).setTarget(getPLTEntry(ref.target()));
- return error_code();
+ return std::error_code();
}
};
OpenPOWER on IntegriCloud