about summary refs log tree commit diff
path: root/compiler/stable_mir/src/compiler_interface.rs
diff options
context:
space:
mode:
authorCelina G. Val <celinval@amazon.com>2023-12-15 13:18:41 -0800
committerCelina G. Val <celinval@amazon.com>2023-12-15 13:18:41 -0800
commit86451badf1113c6b6de99043e3abb87d7021d7e7 (patch)
tree5b5bfc6ee0009738c000938c238a5da7fdf07ce2 /compiler/stable_mir/src/compiler_interface.rs
parent3f39cae1199a2a0217c3646a16d1ae7fa599130b (diff)
downloadrust-86451badf1113c6b6de99043e3abb87d7021d7e7.tar.gz
rust-86451badf1113c6b6de99043e3abb87d7021d7e7.zip
Add a method to check if type is a CStr
Diffstat (limited to 'compiler/stable_mir/src/compiler_interface.rs')
-rw-r--r--compiler/stable_mir/src/compiler_interface.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/stable_mir/src/compiler_interface.rs b/compiler/stable_mir/src/compiler_interface.rs
index 2fac59e71fd..57c60b70d8a 100644
--- a/compiler/stable_mir/src/compiler_interface.rs
+++ b/compiler/stable_mir/src/compiler_interface.rs
@@ -72,6 +72,9 @@ pub trait Context {
     /// Returns whether this ADT is simd.
     fn adt_is_simd(&self, def: AdtDef) -> bool;
 
+    /// Returns whether this definition is a C string.
+    fn adt_is_cstr(&self, def: AdtDef) -> bool;
+
     /// Retrieve the function signature for the given generic arguments.
     fn fn_sig(&self, def: FnDef, args: &GenericArgs) -> PolyFnSig;