summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit97d64717c467b769aee830d9fb496ceea7bf3af0 (patch)
treeca86ea54aee5aae6efa8e0db27b5481e598c8876 /llvm/lib/MC/MCAssembler.cpp
parentace75dff7557560bb2c0890a80f85f249dc32da7 (diff)
downloadbcm5719-llvm-97d64717c467b769aee830d9fb496ceea7bf3af0.tar.gz
bcm5719-llvm-97d64717c467b769aee830d9fb496ceea7bf3af0.zip
MC/Mach-O: Don't adjust section sizes when aligning zero fill sections, just pad the address.
llvm-svn: 98027
Diffstat (limited to 'llvm/lib/MC/MCAssembler.cpp')
-rw-r--r--llvm/lib/MC/MCAssembler.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp
index 4b78dc034fc..e2d7de9a0e9 100644
--- a/llvm/lib/MC/MCAssembler.cpp
+++ b/llvm/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", {
OpenPOWER on IntegriCloud