Fixed ObjectFile functions:
[oota-llvm.git] / lib / Object / Object.cpp
index 719bf882f221dc38e360b823cceff7fbf945d1fb..f061ea7cebedac40087ed7ac5189a7a006e8a7dc 100644 (file)
@@ -150,9 +150,9 @@ uint64_t LLVMGetSymbolAddress(LLVMSymbolIteratorRef SI) {
   return ret;
 }
 
-uint64_t LLVMGetSymbolOffset(LLVMSymbolIteratorRef SI) {
+uint64_t LLVMGetSymbolFileOffset(LLVMSymbolIteratorRef SI) {
   uint64_t ret;
-  if (error_code ec = (*unwrap(SI))->getOffset(ret))
+  if (error_code ec = (*unwrap(SI))->getFileOffset(ret))
     report_fatal_error(ec.message());
   return ret;
 }
@@ -172,6 +172,13 @@ 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))