A few tweaks to MaterializeTemporaryExpr suggested by John.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133528 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp
index d5c18eb..2c00b9b 100644
--- a/lib/CodeGen/CGExpr.cpp
+++ b/lib/CodeGen/CGExpr.cpp
@@ -2078,9 +2078,7 @@
const MaterializeTemporaryExpr *E) {
RValue RV = EmitReferenceBindingToExpr(E->GetTemporaryExpr(),
/*InitializedDecl=*/0);
- return LValue::MakeAddr(RV.getScalarVal(), E->getType(),
- CGM.getContext().getTypeAlign(E->getType()),
- CGM.getContext());
+ return MakeAddrLValue(RV.getScalarVal(), E->getType());
}