forked from OSchip/llvm-project
PR9494: Get rid of bitcast which was both unnecessary and written incorrectly.
llvm-svn: 127768
This commit is contained in:
parent
371d881758
commit
b6069255da
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue