forked from OSchip/llvm-project
[MC] Remove unreachable .comm/.lcomm diagnostic
and make another diagnostic math the prevailing format.
This commit is contained in:
parent
6a4d3f37b5
commit
67c89d9a3c
|
@ -5047,15 +5047,7 @@ bool AsmParser::parseDirectiveComm(bool IsLocal) {
|
||||||
// NOTE: a size of zero for a .comm should create a undefined symbol
|
// NOTE: a size of zero for a .comm should create a undefined symbol
|
||||||
// but a size of .lcomm creates a bss symbol of size zero.
|
// but a size of .lcomm creates a bss symbol of size zero.
|
||||||
if (Size < 0)
|
if (Size < 0)
|
||||||
return Error(SizeLoc, "invalid '.comm' or '.lcomm' directive size, can't "
|
return Error(SizeLoc, "size must be non-negative");
|
||||||
"be less than zero");
|
|
||||||
|
|
||||||
// NOTE: The alignment in the directive is a power of 2 value, the assembler
|
|
||||||
// may internally end up wanting an alignment in bytes.
|
|
||||||
// FIXME: Diagnose overflow.
|
|
||||||
if (Pow2Alignment < 0)
|
|
||||||
return Error(Pow2AlignmentLoc, "invalid '.comm' or '.lcomm' directive "
|
|
||||||
"alignment, can't be less than zero");
|
|
||||||
|
|
||||||
Sym->redefineIfPossible();
|
Sym->redefineIfPossible();
|
||||||
if (!Sym->isUndefined())
|
if (!Sym->isUndefined())
|
||||||
|
|
Loading…
Reference in New Issue