use PanicInfo and UnsupportedOpInfo

This commit is contained in:
Saleem Jaffer 2019-07-29 13:28:55 +05:30
parent 8e9d0faff2
commit 654519d3c5
14 changed files with 42 additions and 42 deletions

View file

@ -2,7 +2,7 @@ use rustc::middle::lang_items;
use rustc::ty::{self, Ty, TypeFoldable, Instance};
use rustc::ty::layout::{self, LayoutOf, HasTyCtxt, FnTypeExt};
use rustc::mir::{self, Place, PlaceBase, Static, StaticKind};
use rustc::mir::interpret::PanicMessage;
use rustc::mir::interpret::PanicInfo;
use rustc_target::abi::call::{ArgType, FnType, PassMode, IgnoreMode};
use rustc_target::spec::abi::Abi;
use crate::base;
@ -368,7 +368,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
// checked operation, just a comparison with the minimum
// value, so we have to check for the assert message.
if !bx.check_overflow() {
if let PanicMessage::OverflowNeg = *msg {
if let PanicInfo::OverflowNeg = *msg {
const_cond = Some(expected);
}
}
@ -403,7 +403,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
// Put together the arguments to the panic entry point.
let (lang_item, args) = match msg {
PanicMessage::BoundsCheck { ref len, ref index } => {
PanicInfo::BoundsCheck { ref len, ref index } => {
let len = self.codegen_operand(&mut bx, len).immediate();
let index = self.codegen_operand(&mut bx, index).immediate();