fix volatile handling with ExtVectorElementExpr, so that we
emit two volatile loads for:
typedef __attribute__(( ext_vector_type(4) )) float float4;
float test(volatile float4 *P) {
return P->x+P->y;
}
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64683 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGValue.h b/lib/CodeGen/CGValue.h
index dbd9dad..318ee55 100644
--- a/lib/CodeGen/CGValue.h
+++ b/lib/CodeGen/CGValue.h
@@ -169,6 +169,10 @@
bool isVolatileQualified() const { return Volatile; }
bool isRestrictQualified() const { return Restrict; }
+ unsigned getQualifiers() const {
+ return (Volatile ? QualType::Volatile : 0) |
+ (Restrict ? QualType::Restrict : 0);
+ }
bool isObjCIvar() const { return Ivar; }
bool isObjCWeak() const { return ObjCType == Weak; }
@@ -275,8 +279,8 @@
SetQualifiers(Qualifiers,R);
return R;
}
- static LValue MakeKVCRef(const ObjCKVCRefExpr *E,
- unsigned Qualifiers) {
+
+ static LValue MakeKVCRef(const ObjCKVCRefExpr *E, unsigned Qualifiers) {
LValue R;
R.LVType = KVCRef;
R.KVCRefExpr = E;