summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit9213355a91bcae48bd2688b74a47d201b1165403 (patch)
tree0ebf4a95e5a1766166ce396da5afa691917bed64 /llvm/lib/MC
parent32ffc58ca91b0a2a29f692a25783fb44a73f3df2 (diff)
downloadbcm5719-llvm-9213355a91bcae48bd2688b74a47d201b1165403.tar.gz
bcm5719-llvm-9213355a91bcae48bd2688b74a47d201b1165403.zip
MC: Eliminate MCFragment::getMaxFileSize.
llvm-svn: 99203
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MCAssembler.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/MC/MCAssembler.cpp b/llvm/lib/MC/MCAssembler.cpp
index 0e4d3cc1efc..432e44a24aa 100644
--- a/llvm/lib/MC/MCAssembler.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud