gccrs: Add support for feature check.
commit476faea3563a559dfd708d7d878ed50f42b7c329
authormxlol233 <mxlol233@outlook.com>
Thu, 12 Jan 2023 14:08:57 +0000 (12 22:08 +0800)
committerArthur Cohen <arthur.cohen@embecosm.com>
Thu, 6 Apr 2023 08:47:19 +0000 (6 10:47 +0200)
treef923dadbfc4e34863d6695ff51369f3650027d70
parent7f5144d1c9638eee4499c45d6ee625ff670cbe69
gccrs: Add  support for feature check.

This commit implements a very basic feature checking module.

gcc/rust/ChangeLog:

* Make-lang.in: Add object files: `rust-feature.o` and `rust-feature-gate.o`
* checks/errors/rust-feature-gate.cc: New file.
* checks/errors/rust-feature-gate.h: New file.
* checks/errors/rust-feature.cc: New file.
* checks/errors/rust-feature.h: New file.
* rust-session-manager.cc: Add FeatureGate check.

gcc/testsuite/ChangeLog:

* rust/compile/feature.rs: New test.

Signed-off-by: Xiao Ma <mxlol233@outlook.com>
gcc/rust/Make-lang.in
gcc/rust/checks/errors/rust-feature-gate.cc [new file with mode: 0644]
gcc/rust/checks/errors/rust-feature-gate.h [new file with mode: 0644]
gcc/rust/checks/errors/rust-feature.cc [new file with mode: 0644]
gcc/rust/checks/errors/rust-feature.h [new file with mode: 0644]
gcc/rust/rust-session-manager.cc
gcc/testsuite/rust/compile/feature.rs [new file with mode: 0644]