diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-08-27 23:45:06 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-27 23:45:06 +0000 |
| commit | ba33ff294eb86826820296a559b67c2c3d47d463 (patch) | |
| tree | ca33eb73d79ca04e9736d55cdc821c1da9ab9286 /llvm/tools/llvm-mc/AsmParser.cpp | |
| parent | 57d9b1e19a100f7ee43e17a40d7f11b078ed2e7a (diff) | |
| download | bcm5719-llvm-ba33ff294eb86826820296a559b67c2c3d47d463.tar.gz bcm5719-llvm-ba33ff294eb86826820296a559b67c2c3d47d463.zip | |
llvm-mc: Unique sections in .zerofill.
llvm-svn: 80305
Diffstat (limited to 'llvm/tools/llvm-mc/AsmParser.cpp')
| -rw-r--r-- | llvm/tools/llvm-mc/AsmParser.cpp | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/llvm/tools/llvm-mc/AsmParser.cpp b/llvm/tools/llvm-mc/AsmParser.cpp index 2c855d950fd..9f219925b0f 100644 --- a/llvm/tools/llvm-mc/AsmParser.cpp +++ b/llvm/tools/llvm-mc/AsmParser.cpp @@ -1287,15 +1287,10 @@ bool AsmParser::ParseDirectiveDarwinZerofill() { // If this is the end of the line all that was wanted was to create the // the section but with no symbol. if (Lexer.is(AsmToken::EndOfStatement)) { - // FIXME: CACHE THIS. - MCSection *S = 0; //Ctx.GetSection(Section); - if (S == 0) - S = MCSectionMachO::Create(Segment, Section, - MCSectionMachO::S_ZEROFILL, 0, - SectionKind(), Ctx); - // Create the zerofill section but no symbol - Out.EmitZerofill(S); + Out.EmitZerofill(getMachOSection(Segment, Section, + MCSectionMachO::S_ZEROFILL, 0, + SectionKind())); return false; } @@ -1348,16 +1343,13 @@ bool AsmParser::ParseDirectiveDarwinZerofill() { if (!Sym->isUndefined()) return Error(IDLoc, "invalid symbol redefinition"); - // FIXME: Arch specific. - // FIXME: CACHE. - MCSection *S = 0; //Ctx.GetSection(Section); - if (S == 0) - S = MCSectionMachO::Create(Segment, Section, - MCSectionMachO::S_ZEROFILL, 0, - SectionKind(), Ctx); - // Create the zerofill Symbol with Size and Pow2Alignment - Out.EmitZerofill(S, Sym, Size, Pow2Alignment); + // + // FIXME: Arch specific. + Out.EmitZerofill(getMachOSection(Segment, Section, + MCSectionMachO::S_ZEROFILL, 0, + SectionKind()), + Sym, Size, Pow2Alignment); return false; } |

