Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MCParser] Reject processor-specific section flags not known by the c…
…urrent target Catch accidentally used flags and match MCSectionELF.cpp `MCSectionELF::printSwitchToSection`. Reviewed By: aeubanks Differential Revision: https://reviews.llvm.org/D148386
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## Some section flags are processor-specific. Reject them for other targets. | ||
# RUN: not llvm-mc -triple=x86_64 %s -o /dev/null 2>&1 | FileCheck %s --implicit-check-not=error: | ||
|
||
# CHECK: {{.*}}.s:[[# @LINE+1]]:34: error: unknown flag | ||
.section XCORE_SHF_CP_SECTION,"c",@progbits | ||
|
||
# CHECK: {{.*}}.s:[[# @LINE+1]]:34: error: unknown flag | ||
.section XCORE_SHF_CP_SECTION,"d",@progbits | ||
|
||
# CHECK: {{.*}}.s:[[# @LINE+1]]:27: error: unknown flag | ||
.section SHF_HEX_GPREL,"s",@progbits | ||
|
||
# CHECK: {{.*}}.s:[[# @LINE+1]]:30: error: unknown flag | ||
.section SHF_ARM_PURECODE,"y",@progbits |