aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-07-24 21:55:34 +0000
committerJordan Rose <jordan_rose@apple.com>2012-07-24 21:55:34 +0000
commitb43f63822e051f2d28d8e083b688b2f113d6ba9c (patch)
tree31e42da02e110a6b4ded84a094ba4569ad68e874 /lib
parent56bf6fd5ea33e3c8c798d908483f3a6266c7a615 (diff)
Add __has_feature(attribute_availability_with_message).
This tests for the ability to include a "message" field in availability attributes, like so: extern void ATSFontGetName(const char *oName) __attribute__((availability(macosx,introduced=8.0,deprecated=9.0, message="use CTFontCopyFullName"))); This was actually supported in Clang 3.1, but we got a request for a __has_feature so that header files can use this more safely. It's unfortunate that the 3.1 release doesn't include this, however. <rdar://problem/11886458> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160699 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Lex/PPMacroExpansion.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp
index c9d400fc66..3a7f02cafb 100644
--- a/lib/Lex/PPMacroExpansion.cpp
+++ b/lib/Lex/PPMacroExpansion.cpp
@@ -619,6 +619,7 @@ static bool HasFeature(const Preprocessor &PP, const IdentifierInfo *II) {
.Case("address_sanitizer", LangOpts.AddressSanitizer)
.Case("attribute_analyzer_noreturn", true)
.Case("attribute_availability", true)
+ .Case("attribute_availability_with_message", true)
.Case("attribute_cf_returns_not_retained", true)
.Case("attribute_cf_returns_retained", true)
.Case("attribute_deprecated_with_message", true)