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 /lib/Object/COFFObjectFile.cpp | |
parent | f56dc281ceea53f191ee3fb773a44aa4e5dc76ce (diff) | |
download | external_llvm-13afc5eff2d7370ab486d5039886ab8bbf9039da.tar.gz external_llvm-13afc5eff2d7370ab486d5039886ab8bbf9039da.tar.bz2 external_llvm-13afc5eff2d7370ab486d5039886ab8bbf9039da.zip |
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 'lib/Object/COFFObjectFile.cpp')
-rw-r--r-- | lib/Object/COFFObjectFile.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Object/COFFObjectFile.cpp b/lib/Object/COFFObjectFile.cpp index 6d9e959f3f..10afad832e 100644 --- a/lib/Object/COFFObjectFile.cpp +++ b/lib/Object/COFFObjectFile.cpp @@ -342,6 +342,20 @@ error_code COFFObjectFile::isSectionText(DataRefImpl Sec, return object_error::success; } +error_code COFFObjectFile::isSectionData(DataRefImpl Sec, + bool &Result) const { + const coff_section *sec = toSec(Sec); + Result = sec->Characteristics & COFF::IMAGE_SCN_CNT_INITIALIZED_DATA; + return object_error::success; +} + +error_code COFFObjectFile::isSectionBSS(DataRefImpl Sec, + bool &Result) const { + const coff_section *sec = toSec(Sec); + Result = sec->Characteristics & COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA; + return object_error::success; +} + error_code COFFObjectFile::sectionContainsSymbol(DataRefImpl Sec, DataRefImpl Symb, bool &Result) const { |