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 | e6cdbf2f92a753ad547e3287e279bf47585b228d (patch) | |
tree | a1159d7a9ee5f7f05922f39b8dae738e0f604e89 /tools/llvm-mc/AsmParser.cpp | |
parent | 2e15292659f174376ef10fac1172c9ef1a605c8a (diff) |
llvm-mc: Emit .lcomm as .zerofill.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80343 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc/AsmParser.cpp')
-rw-r--r-- | tools/llvm-mc/AsmParser.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/llvm-mc/AsmParser.cpp b/tools/llvm-mc/AsmParser.cpp index 9f219925b0..74512ca935 100644 --- a/tools/llvm-mc/AsmParser.cpp +++ b/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; } |