summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/Object.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/Object.cpp')
-rw-r--r--llvm/lib/Object/Object.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/llvm/lib/Object/Object.cpp b/llvm/lib/Object/Object.cpp
index fea34113285..84a5df089cb 100644
--- a/llvm/lib/Object/Object.cpp
+++ b/llvm/lib/Object/Object.cpp
@@ -132,10 +132,7 @@ const char *LLVMGetSectionName(LLVMSectionIteratorRef SI) {
}
uint64_t LLVMGetSectionSize(LLVMSectionIteratorRef SI) {
- uint64_t ret;
- if (std::error_code ec = (*unwrap(SI))->getSize(ret))
- report_fatal_error(ec.message());
- return ret;
+ return (*unwrap(SI))->getSize();
}
const char *LLVMGetSectionContents(LLVMSectionIteratorRef SI) {
@@ -146,18 +143,12 @@ const char *LLVMGetSectionContents(LLVMSectionIteratorRef SI) {
}
uint64_t LLVMGetSectionAddress(LLVMSectionIteratorRef SI) {
- uint64_t ret;
- if (std::error_code ec = (*unwrap(SI))->getAddress(ret))
- report_fatal_error(ec.message());
- return ret;
+ return (*unwrap(SI))->getAddress();
}
LLVMBool LLVMGetSectionContainsSymbol(LLVMSectionIteratorRef SI,
LLVMSymbolIteratorRef Sym) {
- bool ret;
- if (std::error_code ec = (*unwrap(SI))->containsSymbol(**unwrap(Sym), ret))
- report_fatal_error(ec.message());
- return ret;
+ return (*unwrap(SI))->containsSymbol(**unwrap(Sym));
}
// Section Relocation iterators
OpenPOWER on IntegriCloud