summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorMichael J. Spencer <bigcheesegs@gmail.com>2011-09-28 20:57:30 +0000
committerMichael J. Spencer <bigcheesegs@gmail.com>2011-09-28 20:57:30 +0000
commit800619f2bbac692075242e328b944e5d9eaf2134 (patch)
treec8c9ae87f355b58dfc4d072f3590a1dbbee0d7d6 /llvm/lib/Object/COFFObjectFile.cpp
parentc7a710f61e78f5bcb8e1657160159cf46cc2a4d8 (diff)
downloadbcm5719-llvm-800619f2bbac692075242e328b944e5d9eaf2134.tar.gz
bcm5719-llvm-800619f2bbac692075242e328b944e5d9eaf2134.zip
Object: Add isSection{Data,BSS}.
llvm-svn: 140721
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
-rw-r--r--llvm/lib/Object/COFFObjectFile.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/lib/Object/COFFObjectFile.cpp b/llvm/lib/Object/COFFObjectFile.cpp
index 6d9e959f3f3..10afad832e4 100644
--- a/llvm/lib/Object/COFFObjectFile.cpp
+++ b/llvm/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 {
OpenPOWER on IntegriCloud