aboutsummaryrefslogtreecommitdiff
path: root/lib/MC/MCAssembler.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-09 01:12:20 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-09 01:12:20 +0000
commitf8b8ad77a8b5632886a4cfe41d798bae7277efcb (patch)
tree095e00fbe066dea3427abc233fec6168457571a1 /lib/MC/MCAssembler.cpp
parent768069ee7a11756b9ba658a4395faa802fc71548 (diff)
MC/Mach-O: Don't adjust section sizes when aligning zero fill sections, just pad the address.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98027 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCAssembler.cpp')
-rw-r--r--lib/MC/MCAssembler.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp
index 4b78dc034f..e2d7de9a0e 100644
--- a/lib/MC/MCAssembler.cpp
+++ b/lib/MC/MCAssembler.cpp
@@ -1281,17 +1281,13 @@ void MCAssembler::Finish() {
// Align this section if necessary by adding padding bytes to the previous
// section.
- if (uint64_t Pad = OffsetToAlignment(Address, it->getAlignment())) {
- assert(Prev && "Missing prev section!");
- Prev->setFileSize(Prev->getFileSize() + Pad);
+ if (uint64_t Pad = OffsetToAlignment(Address, it->getAlignment()))
Address += Pad;
- }
SD.setAddress(Address);
LayoutSection(SD);
Address += SD.getSize();
- Prev = &SD;
}
DEBUG_WITH_TYPE("mc-dump", {