aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/hir/rust-hir-dump.cc
diff options
context:
space:
mode:
authorKushal Pal <kushalpal109@gmail.com>2024-06-05 11:09:10 +0000
committerCohenArthur <arthur.cohen@embecosm.com>2024-07-16 11:29:33 +0000
commit48c94c4927c818d0f9205b791d551743f3055e97 (patch)
tree4180edb955d33742edca5c62e2423dfe55860c0e /gcc/rust/hir/rust-hir-dump.cc
parente2b6a02937c23fe28c895b935a8e12c206e7ec70 (diff)
downloadgcc-48c94c4927c818d0f9205b791d551743f3055e97.zip
gcc-48c94c4927c818d0f9205b791d551743f3055e97.tar.gz
gcc-48c94c4927c818d0f9205b791d551743f3055e97.tar.bz2
Added FFIVector to get Polonius output on C++ side
ChangeLog: * .github/workflows/ccpp.yml: Switch to nightly version of rustc to use unstable features, namely extern types for FFI. gcc/rust/ChangeLog: * Make-lang.in: Compile new file, rust-polonius.cc * checks/errors/borrowck/ffi-polonius/src/gccrs_ffi.rs: Opaque type to represent FFIVector from C++. * checks/errors/borrowck/ffi-polonius/src/gccrs_ffi_generated.rs: Change types of fields in Output. * checks/errors/borrowck/ffi-polonius/src/lib.rs: Added helper functions to contruct Polonius output on C++ side, used helpers to contruct Polonius output on C++ side. * checks/errors/borrowck/polonius/rust-polonius-ffi.h (make_vector): FFIVector is a wrapper around std::vector for transfering data from Rust to C++. (struct Output): Use pointers to FFIVector instead of bool to store Polonius output data. * checks/errors/borrowck/polonius/rust-polonius.h (FFIVector__new): Helper function. (FFIVector__new_vec_pair): Likewise. (FFIVector__new_vec_triple): Likewise. (FFIVector__push): Likewise. (FFIVector__push_vec_pair): Likewise. (FFIVector__push_vec_triple): Likewise. * checks/errors/borrowck/rust-borrow-checker.cc (BorrowChecker::go): Convert FFIVector to std::vector representation for easier navigation. * checks/errors/borrowck/polonius/rust-polonius.cc: New file, implementation of helper functions. Signed-off-by: Kushal Pal <kushalpal109@gmail.com>
Diffstat (limited to 'gcc/rust/hir/rust-hir-dump.cc')
0 files changed, 0 insertions, 0 deletions