diff options
| author | Daniel Dunbar <daniel@zuster.org> | 2009-08-28 05:48:46 +0000 |
|---|---|---|
| committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-28 05:48:46 +0000 |
| commit | 96abad185dadfa7c2d29472349300ce443a1ce04 (patch) | |
| tree | 7e808de9e856b8d54e0e6965d10d806fdcc22284 /llvm/tools/llvm-mc/AsmParser.cpp | |
| parent | e48a69b2a3d821949db3c52e1fff20401e361496 (diff) | |
| download | bcm5719-llvm-96abad185dadfa7c2d29472349300ce443a1ce04.tar.gz bcm5719-llvm-96abad185dadfa7c2d29472349300ce443a1ce04.zip | |
llvm-mc: Emit .lcomm as .zerofill.
llvm-svn: 80343
Diffstat (limited to 'llvm/tools/llvm-mc/AsmParser.cpp')
| -rw-r--r-- | llvm/tools/llvm-mc/AsmParser.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/tools/llvm-mc/AsmParser.cpp b/llvm/tools/llvm-mc/AsmParser.cpp index 9f219925b0f..74512ca9353 100644 --- a/llvm/tools/llvm-mc/AsmParser.cpp +++ b/llvm/tools/llvm-mc/AsmParser.cpp @@ -1258,7 +1258,13 @@ bool AsmParser::ParseDirectiveComm(bool IsLocal) { return Error(IDLoc, "invalid symbol redefinition"); // Create the Symbol as a common or local common with Size and Pow2Alignment - Out.EmitCommonSymbol(Sym, Size, Pow2Alignment, IsLocal); + if (IsLocal) + Out.EmitZerofill(getMachOSection("__DATA", "__bss", + MCSectionMachO::S_ZEROFILL, 0, + SectionKind()), + Sym, Size, Pow2Alignment); + else + Out.EmitCommonSymbol(Sym, Size, Pow2Alignment); return false; } |

