about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorAyush Singh <ayushsingh1325@gmail.com>2022-11-06 14:01:46 +0530
committerAyush Singh <ayushsingh1325@gmail.com>2022-11-06 14:18:36 +0530
commit299bc61035466b3e6ce0af78d19996a5eef6e294 (patch)
tree54f57d698c730a54883f28e2d7e3fc048acb2759 /compiler/rustc_codegen_ssa/src
parent5b3e9090757da9a95b22f589fe39b6a4b5455b96 (diff)
downloadrust-299bc61035466b3e6ce0af78d19996a5eef6e294.tar.gz
rust-299bc61035466b3e6ce0af78d19996a5eef6e294.zip
Add type_array to BaseTypeMethods
Moved type_array function to rustc_codegen_ssa::BaseTypeMethods trait.
This allows using normal alloca function to create arrays as suggested in
https://github.com/rust-lang/rust/pull/104022.

Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/traits/type_.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/traits/type_.rs b/compiler/rustc_codegen_ssa/src/traits/type_.rs
index bdc6a91cf6a..86481d5d758 100644
--- a/compiler/rustc_codegen_ssa/src/traits/type_.rs
+++ b/compiler/rustc_codegen_ssa/src/traits/type_.rs
@@ -22,6 +22,7 @@ pub trait BaseTypeMethods<'tcx>: Backend<'tcx> {
     fn type_f32(&self) -> Self::Type;
     fn type_f64(&self) -> Self::Type;
 
+    fn type_array(&self, ty: Self::Type, len: u64) -> Self::Type;
     fn type_func(&self, args: &[Self::Type], ret: Self::Type) -> Self::Type;
     fn type_struct(&self, els: &[Self::Type], packed: bool) -> Self::Type;
     fn type_kind(&self, ty: Self::Type) -> TypeKind;