Skip to content

Commit

Permalink
Sync from rust a32d4a0
Browse files Browse the repository at this point in the history
  • Loading branch information
bjorn3 committed Aug 22, 2024
2 parents 01f8739 + 8e7b3b5 commit 46b7db1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions example/mini_core_hello_world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
extern_types,
naked_functions,
thread_local,
repr_simd,
raw_ref_op
repr_simd
)]
#![no_core]
#![allow(dead_code, non_camel_case_types, internal_features)]
Expand Down
2 changes: 1 addition & 1 deletion src/analyze.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub(crate) fn analyze(fx: &FunctionCx<'_, '_, '_>) -> IndexVec<Local, SsaKind> {
for stmt in bb.statements.iter() {
match &stmt.kind {
Assign(place_and_rval) => match &place_and_rval.1 {
Rvalue::Ref(_, _, place) | Rvalue::AddressOf(_, place) => {
Rvalue::Ref(_, _, place) | Rvalue::RawPtr(_, place) => {
flag_map[place.local] = SsaKind::NotSsa;
}
_ => {}
Expand Down
2 changes: 1 addition & 1 deletion src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ fn codegen_stmt<'tcx>(
let val = cplace.to_cvalue(fx);
lval.write_cvalue(fx, val)
}
Rvalue::Ref(_, _, place) | Rvalue::AddressOf(_, place) => {
Rvalue::Ref(_, _, place) | Rvalue::RawPtr(_, place) => {
let place = codegen_place(fx, place);
let ref_ = place.place_ref(fx, lval.layout());
lval.write_cvalue(fx, ref_);
Expand Down

0 comments on commit 46b7db1

Please sign in to comment.