Add `is_trivial_abi` bit to Record IR.
Without a way to look up the Record for a given CcType/RsType, there is no way to make this influence code generation of actual calls which use this type. So this is currently unused.
However, this may be enough, by itself, to mark a type as trivially relocatable. A type with this bit can be passed through registers, which means that, by definition, its memory location doesn't matter, and it can be trivially relocated.
For example, see this godbolt link showing that marking a class as trivial_abi breaks it by causing it to get relocated!
https://godbolt.org/z/voMa5TPKq
PiperOrigin-RevId: 400123681
diff --git a/rs_bindings_from_cc/src_code_gen.rs b/rs_bindings_from_cc/src_code_gen.rs
index 6267238..74b3e6b 100644
--- a/rs_bindings_from_cc/src_code_gen.rs
+++ b/rs_bindings_from_cc/src_code_gen.rs
@@ -516,6 +516,7 @@
],
size: 12,
alignment: 4,
+ is_trivial_abi: true,
}],
functions: vec![],
};