mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
MC: Diagnose an unexpected token in COFF .section instead of asserting
This can easily arise when trying to assemble and ELF style .section directive for a COFF object file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215373 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -364,6 +364,10 @@ bool COFFAsmParser::ParseDirectiveSection(StringRef, SMLoc) {
|
||||
|
||||
Flags |= COFF::IMAGE_SCN_LNK_COMDAT;
|
||||
|
||||
if (!getLexer().is(AsmToken::Identifier))
|
||||
return TokError("expected comdat type such as 'discard' or 'largest' "
|
||||
"after protection bits");
|
||||
|
||||
if (parseCOMDATType(Type))
|
||||
return true;
|
||||
|
||||
|
Reference in New Issue
Block a user