{
// 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);
}
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.
// FIXME: It is probably better if we don't call EvaluateAsAbsolute in
// here.
int64_t Value;
- LF.getValue().EvaluateAsAbsolute(Value, &Layout);
+ bool IsAbs = LF.getValue().EvaluateAsAbsolute(Value, &Layout);
+ assert(IsAbs);
+ (void) IsAbs;
SmallString<32> Tmp;
raw_svector_ostream OSE(Tmp);
if (LF.isSigned())
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.
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