summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGValue.h
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2011-12-03 03:08:40 +0000
committerEli Friedman <eli.friedman@gmail.com>2011-12-03 03:08:40 +0000
commit2869b5afe3cc962cfe33f17d44b0615deeeb7a38 (patch)
tree3fedfbcfdfd0ea3fe5438e74cd17f8248d46c28d /clang/lib/CodeGen/CGValue.h
parentef3ad87ac649db1f09c1c337bdb8b5cfb1d0c268 (diff)
downloadbcm5719-llvm-2869b5afe3cc962cfe33f17d44b0615deeeb7a38.tar.gz
bcm5719-llvm-2869b5afe3cc962cfe33f17d44b0615deeeb7a38.zip
Add a utility to get a RValue for a given LValue for an aggregate; switch a few places over to it.
llvm-svn: 145747
Diffstat (limited to 'clang/lib/CodeGen/CGValue.h')
-rw-r--r--clang/lib/CodeGen/CGValue.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGValue.h b/clang/lib/CodeGen/CGValue.h
index c83000bb978..fd85fb24894 100644
--- a/clang/lib/CodeGen/CGValue.h
+++ b/clang/lib/CodeGen/CGValue.h
@@ -300,6 +300,11 @@ public:
R.Initialize(type, type.getQualifiers());
return R;
}
+
+ RValue asAggregateRValue() const {
+ // FIMXE: Alignment
+ return RValue::getAggregate(getAddress(), isVolatileQualified());
+ }
};
/// An aggregate value slot.
OpenPOWER on IntegriCloud