Skip to content

Commit

Permalink
Merge branch 'rust-lang:master' into implement-int-extension
Browse files Browse the repository at this point in the history
  • Loading branch information
sapir authored Aug 11, 2024
2 parents 3f1304a + 2cc32ba commit aaaf118
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
self.block
.add_eval(self.location, self.cx.context.new_call(self.location, func, &args));
// Return dummy value when not having return value.
self.context.new_rvalue_from_long(self.isize_type, 0)
self.context.new_rvalue_zero(self.isize_type)
}
}

Expand Down Expand Up @@ -421,17 +421,7 @@ impl<'a, 'gcc, 'tcx> Builder<'a, 'gcc, 'tcx> {
self.cx.context.new_call_through_ptr(self.location, func_ptr, &args),
);
// Return dummy value when not having return value.
let result = current_func.new_local(
self.location,
self.isize_type,
"dummyValueThatShouldNeverBeUsed",
);
self.block.add_assignment(
self.location,
result,
self.context.new_rvalue_from_long(self.isize_type, 0),
);
result.to_rvalue()
self.context.new_rvalue_zero(self.isize_type)
}
}

Expand Down

0 comments on commit aaaf118

Please sign in to comment.