mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
MC: Overhaul handling of .lcomm
- Darwin lied about not supporting .lcomm and turned it into zerofill in the asm parser. Push the zerofill-conversion down into macho-specific code. - This makes the tri-state LCOMMType enum superfluous, there are no targets without .lcomm. - Do proper error reporting when trying to use .lcomm with alignment on a target that doesn't support it. - .comm and .lcomm alignment was parsed in bytes on COFF, should be power of 2. - Fixes PR13755 (.lcomm crashes on ELF). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163395 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -312,8 +312,7 @@ void AsmPrinter::EmitGlobalVariable(const GlobalVariable *GV) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (MAI->getLCOMMDirectiveType() != LCOMM::None &&
|
||||
(MAI->getLCOMMDirectiveType() != LCOMM::NoAlignment || Align == 1)) {
|
||||
if (Align == 1 || MAI->getLCOMMDirectiveSupportsAlignment()) {
|
||||
// .lcomm _foo, 42
|
||||
OutStreamer.EmitLocalCommonSymbol(GVSym, Size, Align);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user