Pass the cmdline aapcs bitfield options to cc1
authorTies Stuij <ties.stuij@arm.com>
Tue, 16 Feb 2021 13:56:15 +0000 (13:56 +0000)
committerTies Stuij <ties.stuij@arm.com>
Thu, 18 Feb 2021 15:41:20 +0000 (15:41 +0000)
commit5f7715d8780a1d16ad023995d282a7d94cb923a9
treed94bf1f504c98d80bed92ed54e8daa8e50a26e5f
parenta1e5388a7ca1d0d46ed84ac2dedf52ade7ac8200
Pass the cmdline aapcs bitfield options to cc1

The following commits added commandline arguments to control following the Arm
Procedure Call Standard for certain volatile bitfield operations:
- https://reviews.llvm.org/D67399
- https://reviews.llvm.org/D72932

This commit fixes the oversight that these args weren't passed from the driver
to cc1 if appropriate.

Where *appropriate* means:
- `-faapcs-bitfield-width`: is the default, so won't be passed
- `-fno-aapcs-bitfield-width`: should be passed
- `-faapcs-bitfield-load`: should be passed

Differential Revision: https://reviews.llvm.org/D96784
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/arm-aarch64-bitfield-flags.c [new file with mode: 0644]