aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGObjC.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2011-09-13 05:36:29 +0000
committerJohn McCall <rjmccall@apple.com>2011-09-13 05:36:29 +0000
commit5889c60d19101156a3a54b8c49bcc60a12cc1fdb (patch)
tree0e95719d0cc5daa1c512cc9bad68492ae1d70173 /lib/CodeGen/CGObjC.cpp
parent1e1f4871535f2cadcbf8c9af8cc48a2213192320 (diff)
Always emit bitfield properties using expression behavior, even if they're
atomic. This is probably something we should warn about. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139584 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r--lib/CodeGen/CGObjC.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index 888f67d661..f0a47af909 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -495,6 +495,13 @@ PropertyImplStrategy::PropertyImplStrategy(CodeGenModule &CGM,
return;
}
+ // Properties on bitfield ivars need to be emitted using expression
+ // accesses even if they're nominally atomic.
+ if (ivar->isBitField()) {
+ Kind = Expression;
+ return;
+ }
+
// GC-qualified or ARC-qualified ivars need to be emitted as
// expressions. This actually works out to being atomic anyway,
// except for ARC __strong, but that should trigger the above code.