]> granicus.if.org Git - clang/commit
AST: support ObjC lifetime qualifiers in MS ABI
authorSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 9 Feb 2018 03:23:54 +0000 (03:23 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 9 Feb 2018 03:23:54 +0000 (03:23 +0000)
commit9a2d78fdc5eb5f0a8891d465d2703f709ed363ab
tree4b6540075da00bdab2a0a02c8e9cf1f49cff9cab
parent4d259cd5974c3927ca86d9b61bb9be2d6739913f
AST: support ObjC lifetime qualifiers in MS ABI

Adjust the ObjC protocol conformance workaround to be more extensible.
Use a synthetic type for the protocol (`struct Protocol`).  Embed this
within a reserved namespace to permit extending the extended pointer
type qualifiers similarly for ObjC lifetime qualifiers.

Introduce additional special handling for `__autoreleasing`, `__strong`,
and `__weak` Objective C lifetime qualifiers.  We decorate these by
creating an artificial template type `Autoreleasing`, `Strong`, or
`Weak` in the `__ObjC` namespace.  These are only considered in the
template type specialization and not the function parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324701 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/MicrosoftMangle.cpp
test/CodeGenObjCXX/msabi-objc-extensions.mm [new file with mode: 0644]
test/CodeGenObjCXX/msabi-protocol-conformance.mm [deleted file]