diff options
author | Owen Anderson <resistor@mac.com> | 2011-10-21 18:21:22 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2011-10-21 18:21:22 +0000 |
commit | e2fa64ef22321c5771667a8f00dca737ecb0799c (patch) | |
tree | d0030862ccf87c85bf31fed3f79f33df3981572e /lib/Object/Object.cpp | |
parent | 3cb056797b17785cfd2429ce8232143d5aeb5e42 (diff) |
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
Diffstat (limited to 'lib/Object/Object.cpp')
-rw-r--r-- | lib/Object/Object.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Object/Object.cpp b/lib/Object/Object.cpp index 2ce98d7f9c..638105b56b 100644 --- a/lib/Object/Object.cpp +++ b/lib/Object/Object.cpp @@ -48,6 +48,12 @@ void LLVMMoveToNextSection(LLVMSectionIteratorRef SI) { 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(); |