llvm.org GIT mirror llvm / b81e6cf
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 Reid Kleckner 6 years ago
2 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
363363
364364 Flags |= COFF::IMAGE_SCN_LNK_COMDAT;
365365
366 if (!getLexer().is(AsmToken::Identifier))
367 return TokError("expected comdat type such as 'discard' or 'largest' "
368 "after protection bits");
369
366370 if (parseCOMDATType(Type))
367371 return true;
368372
55
66 // CHECK: error: conflicting section flags 'b' and 'd'
77 .section s_bd,"bd"; .long 1
8
9 // CHECK: error: expected comdat type such as 'discard' or 'largest' after protection bits
10 .section .stack, "w", @nobits