Add a utility to get a RValue for a given LValue for an aggregate; switch a few places over to it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145747 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGValue.h b/lib/CodeGen/CGValue.h
index c83000b..fd85fb2 100644
--- a/lib/CodeGen/CGValue.h
+++ b/lib/CodeGen/CGValue.h
@@ -300,6 +300,11 @@
R.Initialize(type, type.getQualifiers());
return R;
}
+
+ RValue asAggregateRValue() const {
+ // FIMXE: Alignment
+ return RValue::getAggregate(getAddress(), isVolatileQualified());
+ }
};
/// An aggregate value slot.