librustc: use type parameters less vigorously when giving the IR type names

This commit is contained in:
Corey Richardson 2014-11-14 19:26:25 -05:00
parent 1e4e55aebc
commit 5416901cca

View file

@ -455,7 +455,12 @@ pub fn llvm_type_name(cx: &CrateContext,
let base = ty::item_path_str(cx.tcx(), did);
let strings: Vec<String> = tps.iter().map(|t| t.repr(cx.tcx())).collect();
let tstr = format!("{}<{}>", base, strings);
let tstr = if strings.is_empty() {
base
} else {
format!("{}<{}>", base, strings)
};
if did.krate == 0 {
format!("{}.{}", name, tstr)
} else {