diff options
author | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-09-28 20:57:30 +0000 |
---|---|---|
committer | Michael J. Spencer <bigcheesegs@gmail.com> | 2011-09-28 20:57:30 +0000 |
commit | 13afc5eff2d7370ab486d5039886ab8bbf9039da (patch) | |
tree | 532b6e20b5de70506f5033520c1feafba9d855b9 /include/llvm/Object/ObjectFile.h | |
parent | f56dc281ceea53f191ee3fb773a44aa4e5dc76ce (diff) |
Object: Add isSection{Data,BSS}.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Object/ObjectFile.h')
-rw-r--r-- | include/llvm/Object/ObjectFile.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Object/ObjectFile.h b/include/llvm/Object/ObjectFile.h index ca85e14a9b..d648f35511 100644 --- a/include/llvm/Object/ObjectFile.h +++ b/include/llvm/Object/ObjectFile.h @@ -131,6 +131,8 @@ public: // FIXME: Move to the normalization layer when it's created. error_code isText(bool &Result) const; + error_code isData(bool &Result) const; + error_code isBSS(bool &Result) const; error_code containsSymbol(SymbolRef S, bool &Result) const; }; @@ -179,6 +181,8 @@ protected: virtual error_code getSectionSize(DataRefImpl Sec, uint64_t &Res) const = 0; virtual error_code getSectionContents(DataRefImpl Sec, StringRef &Res)const=0; virtual error_code isSectionText(DataRefImpl Sec, bool &Res) const = 0; + virtual error_code isSectionData(DataRefImpl Sec, bool &Res) const = 0; + virtual error_code isSectionBSS(DataRefImpl Sec, bool &Res) const = 0; virtual error_code sectionContainsSymbol(DataRefImpl Sec, DataRefImpl Symb, bool &Result) const = 0; @@ -349,6 +353,14 @@ inline error_code SectionRef::isText(bool &Result) const { return OwningObject->isSectionText(SectionPimpl, Result); } +inline error_code SectionRef::isData(bool &Result) const { + return OwningObject->isSectionData(SectionPimpl, Result); +} + +inline error_code SectionRef::isBSS(bool &Result) const { + return OwningObject->isSectionBSS(SectionPimpl, Result); +} + inline error_code SectionRef::containsSymbol(SymbolRef S, bool &Result) const { return OwningObject->sectionContainsSymbol(SectionPimpl, S.SymbolPimpl, Result); |