diff options
author | Kushal Pal <kushalpal109@gmail.com> | 2024-06-05 11:09:10 +0000 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2025-03-17 16:35:52 +0100 |
commit | 29f847e8b8cf21c12d07f2eec6a53f8bccdffeac (patch) | |
tree | ced5eb644ffe8d683c0d91c31ffd44cf8140aac9 /gcc/rust/hir/tree | |
parent | e50983a756329b2e27359a523d0ff1609c22aaa1 (diff) | |
download | gcc-29f847e8b8cf21c12d07f2eec6a53f8bccdffeac.zip gcc-29f847e8b8cf21c12d07f2eec6a53f8bccdffeac.tar.gz gcc-29f847e8b8cf21c12d07f2eec6a53f8bccdffeac.tar.bz2 |
gccrs: Added FFIVector to get Polonius output on C++ side
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/tree')
0 files changed, 0 insertions, 0 deletions