diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-10-01 18:22:46 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-10-02 13:42:14 +0000 |
| commit | 268e02c3875f8d0310a8eeb36007e7d80aa63cbd (patch) | |
| tree | cdf94a3f3267286ef221c5026e188c6d538502a2 /compiler/rustc_codegen_llvm/src/builder.rs | |
| parent | 0fe84bc38b19bacb7cb2a5765fb4ffa2106fe9e2 (diff) | |
| download | rust-268e02c3875f8d0310a8eeb36007e7d80aa63cbd.tar.gz rust-268e02c3875f8d0310a8eeb36007e7d80aa63cbd.zip | |
Remove type argument of array_alloca and rename to byte_array_alloca
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/builder.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/builder.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/builder.rs b/compiler/rustc_codegen_llvm/src/builder.rs index ae56fe99f06..fca43a0d86d 100644 --- a/compiler/rustc_codegen_llvm/src/builder.rs +++ b/compiler/rustc_codegen_llvm/src/builder.rs @@ -418,9 +418,10 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> { } } - fn array_alloca(&mut self, ty: &'ll Type, len: &'ll Value, align: Align) -> &'ll Value { + fn byte_array_alloca(&mut self, len: &'ll Value, align: Align) -> &'ll Value { unsafe { - let alloca = llvm::LLVMBuildArrayAlloca(self.llbuilder, ty, len, UNNAMED); + let alloca = + llvm::LLVMBuildArrayAlloca(self.llbuilder, self.cx().type_i8(), len, UNNAMED); llvm::LLVMSetAlignment(alloca, align.bytes() as c_uint); alloca } |
