Bind libObject API for obtaining the section containing a Symbol.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142667 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Object/Object.cpp b/lib/Object/Object.cpp
index 2ce98d7..638105b 100644
--- a/lib/Object/Object.cpp
+++ b/lib/Object/Object.cpp
@@ -48,6 +48,12 @@
   if (ec) report_fatal_error("LLVMMoveToNextSection failed: " + ec.message());
 }
 
+void LLVMMoveToContainingSection(LLVMSectionIteratorRef Sect,
+                                 LLVMSymbolIteratorRef Sym) {
+  if (error_code ec = (*unwrap(Sym))->getSection(*unwrap(Sect)))
+    report_fatal_error(ec.message());
+}
+
 // ObjectFile Symbol iterators
 LLVMSymbolIteratorRef LLVMGetSymbols(LLVMObjectFileRef ObjectFile) {
   symbol_iterator SI = unwrap(ObjectFile)->begin_symbols();