summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object')
-rw-r--r--llvm/lib/Object/MachOObjectFile.cpp9
-rw-r--r--llvm/lib/Object/ObjectFile.cpp6
2 files changed, 4 insertions, 11 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp
index 439dceb323b..cae5b799ac1 100644
--- a/llvm/lib/Object/MachOObjectFile.cpp
+++ b/llvm/lib/Object/MachOObjectFile.cpp
@@ -401,16 +401,13 @@ std::error_code MachOObjectFile::getSymbolAddress(DataRefImpl Symb,
return object_error::success;
}
-std::error_code MachOObjectFile::getSymbolAlignment(DataRefImpl DRI,
- uint32_t &Result) const {
+uint32_t MachOObjectFile::getSymbolAlignment(DataRefImpl DRI) const {
uint32_t flags = getSymbolFlags(DRI);
if (flags & SymbolRef::SF_Common) {
MachO::nlist_base Entry = getSymbolTableEntryBase(this, DRI);
- Result = 1 << MachO::GET_COMM_ALIGN(Entry.n_desc);
- } else {
- Result = 0;
+ return 1 << MachO::GET_COMM_ALIGN(Entry.n_desc);
}
- return object_error::success;
+ return 0;
}
std::error_code MachOObjectFile::getSymbolSize(DataRefImpl DRI,
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp
index 01b76543fa2..0950c7daafd 100644
--- a/llvm/lib/Object/ObjectFile.cpp
+++ b/llvm/lib/Object/ObjectFile.cpp
@@ -37,11 +37,7 @@ std::error_code ObjectFile::printSymbolName(raw_ostream &OS,
return object_error::success;
}
-std::error_code ObjectFile::getSymbolAlignment(DataRefImpl DRI,
- uint32_t &Result) const {
- Result = 0;
- return object_error::success;
-}
+uint32_t ObjectFile::getSymbolAlignment(DataRefImpl DRI) const { return 0; }
section_iterator ObjectFile::getRelocatedSection(DataRefImpl Sec) const {
return section_iterator(SectionRef(Sec, this));
OpenPOWER on IntegriCloud