From 790552c20fbd8daa77d343419f0f6ec4e7fa1457 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sun, 27 Nov 2011 10:37:47 +0000 Subject: Revert r145180 as it is causing test failures on all the bots. Original commit message: Fixed ObjectFile functions: - getSymbolOffset() renamed as getSymbolFileOffset() - getSymbolFileOffset(), getSymbolAddress(), getRelocationAddress() returns same result for ELFObjectFile, MachOObjectFile and COFFObjectFile. - added getRelocationOffset() - fixed MachOObjectFile::getSymbolSize() - fixed MachOObjectFile::getSymbolSection() - fixed MachOObjectFile::getSymbolOffset() for symbols without section data. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145182 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Object/Object.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'lib/Object/Object.cpp') diff --git a/lib/Object/Object.cpp b/lib/Object/Object.cpp index f061ea7ceb..719bf882f2 100644 --- a/lib/Object/Object.cpp +++ b/lib/Object/Object.cpp @@ -150,9 +150,9 @@ uint64_t LLVMGetSymbolAddress(LLVMSymbolIteratorRef SI) { return ret; } -uint64_t LLVMGetSymbolFileOffset(LLVMSymbolIteratorRef SI) { +uint64_t LLVMGetSymbolOffset(LLVMSymbolIteratorRef SI) { uint64_t ret; - if (error_code ec = (*unwrap(SI))->getFileOffset(ret)) + if (error_code ec = (*unwrap(SI))->getOffset(ret)) report_fatal_error(ec.message()); return ret; } @@ -172,13 +172,6 @@ uint64_t LLVMGetRelocationAddress(LLVMRelocationIteratorRef RI) { return ret; } -uint64_t LLVMGetRelocationOffset(LLVMRelocationIteratorRef RI) { - uint64_t ret; - if (error_code ec = (*unwrap(RI))->getOffset(ret)) - report_fatal_error(ec.message()); - return ret; -} - LLVMSymbolIteratorRef LLVMGetRelocationSymbol(LLVMRelocationIteratorRef RI) { SymbolRef ret; if (error_code ec = (*unwrap(RI))->getSymbol(ret)) -- cgit v1.2.3-18-g5258