llvm-mc: Emit .lcomm as .zerofill.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80343 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2009-08-28 05:48:46 +00:00
parent 2e15292659
commit e6cdbf2f92
7 changed files with 18 additions and 17 deletions

View File

@@ -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;
}