Skip to content

Commit

Permalink
Update to nightly-2023-08-12
Browse files Browse the repository at this point in the history
  • Loading branch information
antoyo committed Aug 13, 2023
1 parent 8a160d6 commit 43431e4
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions build_sysroot/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
authors = ["bjorn3 <[email protected]>"]
name = "sysroot"
version = "0.0.0"
resolver = "2"

[dependencies]
core = { path = "./sysroot_src/library/core" }
Expand Down
1 change: 1 addition & 0 deletions example/alloc_example.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![feature(start, core_intrinsics, alloc_error_handler, lang_items)]
#![no_std]
#![allow(internal_features)]

extern crate alloc;
extern crate alloc_system;
Expand Down
1 change: 1 addition & 0 deletions example/arbitrary_self_types_pointers_and_wrappers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#![feature(arbitrary_self_types, unsize, coerce_unsized, dispatch_from_dyn)]
#![feature(rustc_attrs)]
#![allow(internal_features)]

use std::{
ops::{Deref, CoerceUnsized, DispatchFromDyn},
Expand Down
2 changes: 1 addition & 1 deletion example/mini_core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
thread_local
)]
#![no_core]
#![allow(dead_code)]
#![allow(dead_code, internal_features)]

#[no_mangle]
unsafe extern "C" fn _Unwind_Resume() {
Expand Down
2 changes: 1 addition & 1 deletion example/mini_core_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
extern_types, thread_local
)]
#![no_core]
#![allow(dead_code, non_camel_case_types)]
#![allow(dead_code, internal_features, non_camel_case_types)]

extern crate mini_core;

Expand Down
1 change: 1 addition & 0 deletions example/mod_bench.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![feature(start, core_intrinsics, lang_items)]
#![no_std]
#![allow(internal_features)]

#[link(name = "c")]
extern {}
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2023-06-19"
channel = "nightly-2023-08-12"
components = ["rust-src", "rustc-dev", "llvm-tools-preview"]
13 changes: 4 additions & 9 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,16 +247,9 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
}

fn check_store(&mut self, val: RValue<'gcc>, ptr: RValue<'gcc>) -> RValue<'gcc> {
let dest_ptr_ty = self.cx.val_ty(ptr).make_pointer(); // TODO(antoyo): make sure make_pointer() is okay here.
let stored_ty = self.cx.val_ty(val);
let stored_ptr_ty = self.cx.type_ptr_to(stored_ty);

if dest_ptr_ty == stored_ptr_ty {
ptr
}
else {
self.bitcast(ptr, stored_ptr_ty)
}
self.bitcast(ptr, stored_ptr_ty)
}

pub fn current_func(&self) -> Function<'gcc> {
Expand Down Expand Up @@ -916,7 +909,9 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
.add_eval(None, self.context.new_call(None, atomic_store, &[ptr, value, ordering]));
}

fn gep(&mut self, _typ: Type<'gcc>, ptr: RValue<'gcc>, indices: &[RValue<'gcc>]) -> RValue<'gcc> {
fn gep(&mut self, typ: Type<'gcc>, ptr: RValue<'gcc>, indices: &[RValue<'gcc>]) -> RValue<'gcc> {
// NOTE: due to opaque pointers now being used, we need to cast here.
let ptr = self.context.new_cast(None, ptr, typ.make_pointer());
let ptr_type = ptr.get_type();
let mut pointee_type = ptr.get_type();
// NOTE: we cannot use array indexing here like in inbounds_gep because array indexing is
Expand Down

0 comments on commit 43431e4

Please sign in to comment.