summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-06-26 12:33:37 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-06-26 12:33:37 +0000
commit41401e9c803c52af38cf0ad7813c35b5336006a4 (patch)
treed08e10259218d18ae97970e315ccd5435da67f6d /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
parent2fa80cc5fde697acfc8c69c38e2648aee063d5b7 (diff)
downloadbcm5719-llvm-41401e9c803c52af38cf0ad7813c35b5336006a4.tar.gz
bcm5719-llvm-41401e9c803c52af38cf0ad7813c35b5336006a4.zip
Add a ELFSectionRef class and use it to expose getSectionType.
llvm-svn: 240778
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
index 6df3d778565..fdb634e888c 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
@@ -306,10 +306,10 @@ static bool isReadOnlyData(const SectionRef &Section) {
return false;
}
-static bool isZeroInit(const SectionRef &Section) {
+static bool isZeroInit(const SectionRef Section) {
const ObjectFile *Obj = Section.getObject();
- if (auto *ELFObj = dyn_cast<object::ELFObjectFileBase>(Obj))
- return ELFObj->getSectionType(Section) == ELF::SHT_NOBITS;
+ if (isa<object::ELFObjectFileBase>(Obj))
+ return ELFSectionRef(Section).getType() == ELF::SHT_NOBITS;
if (auto *COFFObj = dyn_cast<object::COFFObjectFile>(Obj))
return COFFObj->getCOFFSection(Section)->Characteristics &
COFF::IMAGE_SCN_CNT_UNINITIALIZED_DATA;
OpenPOWER on IntegriCloud