PR9494: Get rid of bitcast which was both unnecessary and written incorrectly.

llvm-svn: 127768
This commit is contained in:
Eli Friedman 2011-03-16 22:34:09 +00:00
parent 371d881758
commit b6069255da
2 changed files with 13 additions and 3 deletions

View File

@ -328,9 +328,8 @@ EmitExprForReferenceBinding(CodeGenFunction &CGF, const Expr *E,
}
}
const llvm::Type *ResultPtrTy = CGF.ConvertType(ResultTy)->getPointerTo();
return CGF.Builder.CreateBitCast(Object, ResultPtrTy, "temp");
return Object;
}
}

View File

@ -258,3 +258,14 @@ void f() {
}
}
// PR9494
namespace N5 {
struct AnyS { bool b; };
void f(const bool&);
AnyS g();
void h() {
// CHECK: call i8 @_ZN2N51gEv()
// CHECK: call void @_ZN2N51fERKb(i8*
f(g().b);
}
}