Skip to content

Commit

Permalink
Fix generator.py to avoid pathological inlining
Browse files Browse the repository at this point in the history
Commit 9104a90 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 rust-lang#28273
  • Loading branch information
ranma42 committed Sep 12, 2015
1 parent d89a10b commit 9ef62a4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/etc/platform-intrinsics/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,7 @@ def open(self, platform):
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())
Expand Down

0 comments on commit 9ef62a4

Please sign in to comment.