r263172 - Print strict in Availability attribute when it is on.
Manman Ren via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 10 15:54:13 PST 2016
Author: mren
Date: Thu Mar 10 17:54:12 2016
New Revision: 263172
URL: http://llvm.org/viewvc/llvm-project?rev=263172&view=rev
Log:
Print strict in Availability attribute when it is on.
Modified:
cfe/trunk/test/Sema/attr-print.c
cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
Modified: cfe/trunk/test/Sema/attr-print.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/attr-print.c?rev=263172&r1=263171&r2=263172&view=diff
==============================================================================
--- cfe/trunk/test/Sema/attr-print.c (original)
+++ cfe/trunk/test/Sema/attr-print.c Thu Mar 10 17:54:12 2016
@@ -32,3 +32,6 @@ int * __uptr __ptr32 p32_3;
// CHECK: int * __sptr * __ptr32 ppsp32;
int * __sptr * __ptr32 ppsp32;
+
+// CHECK: __attribute__((availability(macosx, strict, introduced=10.6)));
+void f6(int) __attribute__((availability(macosx,strict,introduced=10.6)));
Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=263172&r1=263171&r2=263172&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Thu Mar 10 17:54:12 2016
@@ -1103,6 +1103,7 @@ createArgument(const Record &Arg, String
static void writeAvailabilityValue(raw_ostream &OS) {
OS << "\" << getPlatform()->getName();\n"
+ << " if (getStrict()) OS << \", strict\";\n"
<< " if (!getIntroduced().empty()) OS << \", introduced=\" << getIntroduced();\n"
<< " if (!getDeprecated().empty()) OS << \", deprecated=\" << getDeprecated();\n"
<< " if (!getObsoleted().empty()) OS << \", obsoleted=\" << getObsoleted();\n"
More information about the cfe-commits
mailing list