From 96abad185dadfa7c2d29472349300ce443a1ce04 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 28 Aug 2009 05:48:46 +0000 Subject: llvm-mc: Emit .lcomm as .zerofill. llvm-svn: 80343 --- llvm/tools/llvm-mc/AsmParser.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'llvm/tools/llvm-mc/AsmParser.cpp') 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; } -- cgit v1.2.3