Reuse LLVMConstInBoundsGEP2
We have had LLVM 14 as our minimum for a bit now.
This commit is contained in:
parent
71f71a5397
commit
0726c7826b
3 changed files with 3 additions and 14 deletions
|
@ -290,7 +290,7 @@ impl<'ll, 'tcx> ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
|||
}
|
||||
};
|
||||
let llval = unsafe {
|
||||
llvm::LLVMRustConstInBoundsGEP2(
|
||||
llvm::LLVMConstInBoundsGEP2(
|
||||
self.type_i8(),
|
||||
self.const_bitcast(base_addr, self.type_i8p_ext(base_addr_space)),
|
||||
&self.const_usize(offset.bytes()),
|
||||
|
@ -320,7 +320,7 @@ impl<'ll, 'tcx> ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
|
|||
|
||||
fn const_ptr_byte_offset(&self, base_addr: Self::Value, offset: abi::Size) -> Self::Value {
|
||||
unsafe {
|
||||
llvm::LLVMRustConstInBoundsGEP2(
|
||||
llvm::LLVMConstInBoundsGEP2(
|
||||
self.type_i8(),
|
||||
self.const_bitcast(base_addr, self.type_i8p()),
|
||||
&self.const_usize(offset.bytes()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue