[MCParser] Reject processor-specific section flags not known by the current target
authorFangrui Song <i@maskray.me>
Fri, 14 Apr 2023 23:06:12 +0000 (16:06 -0700)
committerFangrui Song <i@maskray.me>
Fri, 14 Apr 2023 23:06:12 +0000 (16:06 -0700)
commita4ad6a3b2db0afcc4558d874397fb7ae7264d77f
tree56fc97d7c8c026886e39e857c659b6ec21903599
parent3e559509b426b6aae735a7f57dbdaed1041d2622
[MCParser] Reject processor-specific section flags not known by the current target

Catch accidentally used flags and match MCSectionELF.cpp
`MCSectionELF::printSwitchToSection`.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D148386
llvm/lib/MC/MCParser/ELFAsmParser.cpp
llvm/test/MC/ELF/section-flags-unknown.s [new file with mode: 0644]