summaryrefslogtreecommitdiffstats
path: root/clang/test/Driver/arm-execute-only.c
Commit message (Collapse)AuthorAgeFilesLines
* Let unaliased Args track which Alias they were created from, and use that in ↵Nico Weber2019-07-091-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arg::getAsString() for diagnostics With this, `clang-cl /source-charset:utf-16 test.cc` now prints `invalid value 'utf-16' in '/source-charset:utf-16'` instead of `invalid value 'utf-16' in '-finput-charset=utf-16'` before, and several other clang-cl flags produce much less confusing output as well. Fixes PR29106. Since an arg and its alias can have different arg types (joined vs not) and different values (because of AliasArgs<>), I chose to give the Alias its own Arg object. For convenience, I just store the alias directly in the unaliased arg – there aren't many arg objects at runtime, so that seems ok. Finally, I changed Arg::getAsString() to use the alias's representation if it's present – that function was already documented as being the suitable function for diagnostics, and most callers already used it for diagnostics. Implementation-wise, Arg::accept() previously used to parse things as the unaliased option. The core of that switch is now extracted into a new function acceptInternal() which parses as the _aliased_ option, and the previously-intermingled unaliasing is now done as an explicit step afterwards. (This also changes one place in lld that didn't use getAsString() for diagnostics, so that that one place now also prints the flag as the user wrote it, not as it looks after it went through unaliasing.) Differential Revision: https://reviews.llvm.org/D64253 llvm-svn: 365413
* Remove unused CHECK lines leftover from r306928.Eli Friedman2018-03-301-4/+0
| | | | | | | The RUN lines were removed, but the corresponding CHECK lines never went away. llvm-svn: 328891
* Update clang support for -mexecute-only/-mpure-code for backend change to ↵Eric Christopher2017-07-011-72/+0
| | | | | | use subtarget feature rather than command line option. llvm-svn: 306928
* [ARM] Don't pass -arm-execute-only to cc1asChristof Douma2017-02-281-0/+4
| | | | | | | | | | | The option -mexecute-only is translated into the backend option -arm-execute-only. But this option only makes sense for the compiler and the assembler does not recognize it. This patch stops clang from passing this option to the assembler. Change-Id: I4f4cb1162c13cfd50a0a36702a4ecab1bc0324ba Review: https://reviews.llvm.org/D30414 llvm-svn: 296454
* [ARM] Add missing -backend-option for -arm-execute-onlyPrakhar Bahuguna2016-12-191-2/+2
| | | | llvm-svn: 290110
* [ARM] Implement execute-only support in CodeGenPrakhar Bahuguna2016-12-151-0/+99
Summary: This implements execute-only support for ARM code generation, which prevents the compiler from generating data accesses to code sections. The following changes are involved: * Add the CodeGen option "-arm-execute-only" to the ARM code generator. * Add the clang flag "-mexecute-only" as well as the GCC-compatible alias "-mpure-code" to enable this option. * When enabled, literal pools are replaced with MOVW/MOVT instructions, with VMOV used in addition for floating-point literals. As the MOVT instruction is required, execute-only support is only available in Thumb mode for targets supporting ARMv8-M baseline or Thumb2. * Jump tables are placed in data sections when in execute-only mode. * The execute-only text section is assigned section ID 0, and is marked as unreadable with the SHF_ARM_PURECODE flag with symbol 'y'. This also overrides selection of ELF sections for globals. Reviewers: t.p.northover, rengolin Subscribers: llvm-commits, aemerson Differential Revision: https://reviews.llvm.org/D27450 llvm-svn: 289786
OpenPOWER on IntegriCloud