diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2016-05-26 00:37:30 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2016-05-26 00:37:30 +0000 |
commit | 9793769423cdfcaf5fcf1b4f05c61230407f108f (patch) | |
tree | 6069c08360067595f3409e657ae36f2bbe18c466 /lib/AST/Type.cpp | |
parent | 5d36cf313ae9c9e6d475891ec2c0cb3a25ee62b1 (diff) |
[ObjC] Remove _Atomic from return type and parameter type of
objective-c properties.
This fixes an assert in CodeGen that fires when the getter and setter
functions for an objective-c property of type _Atomic(_Bool) are
synthesized.
rdar://problem/26322972
Differential Revision: http://reviews.llvm.org/D20407
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270808 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r-- | lib/AST/Type.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp index 0e5f0b256e..6dc585bf29 100644 --- a/lib/AST/Type.cpp +++ b/lib/AST/Type.cpp @@ -1274,6 +1274,12 @@ QualType QualType::stripObjCKindOfType(const ASTContext &constCtx) const { }); } +QualType QualType::getAtomicUnqualifiedType() const { + if (auto AT = getTypePtr()->getAs<AtomicType>()) + return AT->getValueType().getUnqualifiedType(); + return getUnqualifiedType(); +} + Optional<ArrayRef<QualType>> Type::getObjCSubstitutions( const DeclContext *dc) const { // Look through method scopes. |