1
Fork 0

Fix generator.py to avoid pathological inlining

Commit 9104a902c0 fixed the generated
files, but that change would be lost (or require additional manual
intervention) if they are re-generated of if new architectures are
added.

cc #28273
This commit is contained in:
Andrea Canciani 2015-09-12 09:25:11 +02:00
parent d89a10b0a6
commit 9ef62a4490

View file

@ -737,6 +737,7 @@ use {{Intrinsic, i, i_, u, u_, f, v, v_, agg, p, void}};
use IntrinsicDef::Named;
use rustc::middle::ty;
#[inline(never)]
pub fn find<'tcx>(_tcx: &ty::ctxt<'tcx>, name: &str) -> Option<Intrinsic> {{
if !name.starts_with("{0}") {{ return None }}
Some(match &name["{0}".len()..] {{'''.format(platform.intrinsic_prefix())