mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-07 12:56:43 +00:00
Simplify.
llvm-svn: 103651
This commit is contained in:
parent
6a495507e5
commit
e8f8a29de5
@ -459,11 +459,9 @@ void MCAssembler::LayoutSection(MCAsmLayout &Layout,
|
||||
// Unless this section is virtual (where we are allowed to adjust the offset
|
||||
// freely), the padding goes in the previous section.
|
||||
if (!IsVirtual) {
|
||||
// Find the previous non-virtual section.
|
||||
iterator it = &SD;
|
||||
assert(it != begin() && "Invalid initial section address!");
|
||||
for (--it; getBackend().isVirtualSection(it->getSection()); --it) ;
|
||||
Layout.setSectionFileSize(&*it, Layout.getSectionFileSize(&*it) + Pad);
|
||||
assert(SectionOrderIndex && "Invalid initial section address!");
|
||||
MCSectionData *Prev = Layout.getSectionOrder()[SectionOrderIndex - 1];
|
||||
Layout.setSectionFileSize(Prev, Layout.getSectionFileSize(Prev) + Pad);
|
||||
}
|
||||
|
||||
StartAddress += Pad;
|
||||
|
Loading…
x
Reference in New Issue
Block a user