unsafe fn gen_get_value(
        &mut self,
        builder: LLVMBuilderRef,
        ty: LLVMTypeRef,
        buffer: LLVMValueRef,
        position: LLVMValueRef,
    ) -> WeldResult<(LLVMValueRef, LLVMValueRef)> {
        let size = self.size_of(ty);
        let pointer = self.gen_at(builder, &SER_TY, buffer, position)?;

        // Write the value.
        let pointer_typed = LLVMBuildBitCast(builder, pointer, LLVMPointerType(ty, 0), c_str!(""));
        let value = self.load(builder, pointer_typed)?;

        // Update the position.
        let new_position = LLVMBuildAdd(builder, position, size, c_str!(""));
        Ok((value, new_position))
    }
Read a value into a register from the serialization buffer.
weld/src/codegen/llvm2/serde.rs