summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAssembler.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-11-17 20:03:54 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-11-17 20:03:54 +0000
commit7a2cd8b5401ef57af7bd5164c4305961708fe264 (patch)
tree1b0d9bde0cc63a8543653d8a3396e84652429c3a /llvm/lib/MC/MCAssembler.cpp
parentbced7ae04663b4b9e30b5f8a6d9479f467cb60cb (diff)
downloadbcm5719-llvm-7a2cd8b5401ef57af7bd5164c4305961708fe264.tar.gz
bcm5719-llvm-7a2cd8b5401ef57af7bd5164c4305961708fe264.zip
make isVirtualSection a virtual method on MCSection. Chris' suggestion.
llvm-svn: 119547
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r--llvm/lib/MC/MCAssembler.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp
index c80dc3c2483..a23bab25a4d 100644
--- a/llvm/lib/MC/MCAssembler.cpp
+++ b/llvm/lib/MC/MCAssembler.cpp
@@ -54,10 +54,10 @@ MCAsmLayout::MCAsmLayout(MCAssembler &Asm)
{
// Compute the section layout order. Virtual sections must go last.
for (MCAssembler::iterator it = Asm.begin(), ie = Asm.end(); it != ie; ++it)
- if (!Asm.getBackend().isVirtualSection(it->getSection()))
+ if (!it->getSection().isVirtualSection())
SectionOrder.push_back(&*it);
for (MCAssembler::iterator it = Asm.begin(), ie = Asm.end(); it != ie; ++it)
- if (Asm.getBackend().isVirtualSection(it->getSection()))
+ if (it->getSection().isVirtualSection())
SectionOrder.push_back(&*it);
}
@@ -157,7 +157,7 @@ uint64_t MCAsmLayout::getSectionAddressSize(const MCSectionData *SD) const {
uint64_t MCAsmLayout::getSectionFileSize(const MCSectionData *SD) const {
// Virtual sections have no file size.
- if (getAssembler().getBackend().isVirtualSection(SD->getSection()))
+ if (SD->getSection().isVirtualSection())
return 0;
// Otherwise, the file size is the same as the address space size.
@@ -541,7 +541,7 @@ void MCAssembler::WriteSectionData(const MCSectionData *SD,
const MCAsmLayout &Layout,
MCObjectWriter *OW) const {
// Ignore virtual sections.
- if (getBackend().isVirtualSection(SD->getSection())) {
+ if (SD->getSection().isVirtualSection()) {
assert(Layout.getSectionFileSize(SD) == 0 && "Invalid size for section!");
// Check that contents are only things legal inside a virtual section.
@@ -630,7 +630,7 @@ void MCAssembler::Finish(MCObjectWriter *Writer) {
continue;
// Ignore virtual sections, they don't cause file size modifications.
- if (getBackend().isVirtualSection(SD->getSection()))
+ if (SD->getSection().isVirtualSection())
continue;
// Otherwise, create a new align fragment at the end of the previous
OpenPOWER on IntegriCloud