aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-22 20:35:43 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-22 20:35:43 +0000
commit2a6e3f5be21fdcb1fa81533ec81ba879df815607 (patch)
treee0f810ab2cf8392dae3bf034af782a93979609d8 /lib/MC
parent8d39eb47d6a15d36be7ac0d0154a6897e42f5adc (diff)
downloadexternal_llvm-2a6e3f5be21fdcb1fa81533ec81ba879df815607.zip
external_llvm-2a6e3f5be21fdcb1fa81533ec81ba879df815607.tar.gz
external_llvm-2a6e3f5be21fdcb1fa81533ec81ba879df815607.tar.bz2
MC: Eliminate MCFragment::getMaxFileSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99203 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r--lib/MC/MCAssembler.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp
index 0e4d3cc..432e44a 100644
--- a/lib/MC/MCAssembler.cpp
+++ b/lib/MC/MCAssembler.cpp
@@ -320,10 +320,15 @@ void MCAssembler::LayoutSection(MCSectionData &SD,
}
case MCFragment::FT_Data:
- case MCFragment::FT_Fill:
- F.setFileSize(F.getMaxFileSize());
+ F.setFileSize(cast<MCDataFragment>(F).getContents().size());
break;
+ case MCFragment::FT_Fill: {
+ MCFillFragment &FF = cast<MCFillFragment>(F);
+ F.setFileSize(FF.getValueSize() * FF.getCount());
+ break;
+ }
+
case MCFragment::FT_Org: {
MCOrgFragment &OF = cast<MCOrgFragment>(F);