Skip to content

Commit d66a674

Browse files
authored
Merge pull request #11776 from apple/revert-11739-version-tuple-dot
2 parents 84caa59 + b083020 commit d66a674

File tree

5 files changed

+3
-74
lines changed

5 files changed

+3
-74
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7029,8 +7029,7 @@ void ClangImporter::Implementation::importAttributes(
70297029

70307030
StringRef message = avail->getMessage();
70317031

7032-
clang::VersionTuple deprecated = avail->getDeprecated();
7033-
7032+
const auto &deprecated = avail->getDeprecated();
70347033
if (!deprecated.empty()) {
70357034
if (platformAvailability.deprecatedAsUnavailableFilter &&
70367035
platformAvailability.deprecatedAsUnavailableFilter(
@@ -7042,14 +7041,8 @@ void ClangImporter::Implementation::importAttributes(
70427041
}
70437042
}
70447043

7045-
clang::VersionTuple obsoleted = avail->getObsoleted();
7046-
clang::VersionTuple introduced = avail->getIntroduced();
7047-
7048-
// Swift only allows "." separators.
7049-
obsoleted.UseDotAsSeparator();
7050-
introduced.UseDotAsSeparator();
7051-
deprecated.UseDotAsSeparator();
7052-
7044+
const auto &obsoleted = avail->getObsoleted();
7045+
const auto &introduced = avail->getIntroduced();
70537046
const auto &replacement = avail->getReplacement();
70547047

70557048
StringRef swiftReplacement = "";

test/IDE/Inputs/print_clang_header/header-to-print.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,3 @@ struct Arkham;
3232
@protocol Soul;
3333

3434
typedef struct __attribute__((objc_bridge(id))) __MyLittleCFType *MyLittleCFType;
35-
36-
@interface MaybeAvailable
37-
-(void)method1 __attribute__((availability(macosx, introduced=10.1)));
38-
-(void)method2 __attribute__((availability(macosx, introduced=10_1)));
39-
-(void)method3 __attribute__((availability(macosx, deprecated=10_10)));
40-
-(void)method4 __attribute__((availability(macosx, introduced=10_1, deprecated=10_10, obsoleted=10_11)));
41-
@end

test/IDE/Inputs/print_clang_header/header-to-print.h.command-line-include.printed.txt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,3 @@ protocol Superproto {
2828

2929
class MyLittleCFType {
3030
}
31-
32-
class MaybeAvailable {
33-
@available(OSX 10.1, *)
34-
class func method1()
35-
@available(OSX 10.1, *)
36-
func method1()
37-
@available(OSX 10.1, *)
38-
class func method2()
39-
@available(OSX 10.1, *)
40-
func method2()
41-
@available(OSX, deprecated: 10.10)
42-
class func method3()
43-
@available(OSX, deprecated: 10.10)
44-
func method3()
45-
@available(OSX, introduced: 10.1, deprecated: 10.10, obsoleted: 10.11)
46-
class func method4()
47-
@available(OSX, introduced: 10.1, deprecated: 10.10, obsoleted: 10.11)
48-
func method4()
49-
}

test/IDE/Inputs/print_clang_header/header-to-print.h.module.printed.txt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,3 @@ protocol Superproto {
2525

2626
class MyLittleCFType : _CFObject {
2727
}
28-
29-
class MaybeAvailable {
30-
@available(OSX 10.1, *)
31-
class func method1()
32-
@available(OSX 10.1, *)
33-
func method1()
34-
@available(OSX 10.1, *)
35-
class func method2()
36-
@available(OSX 10.1, *)
37-
func method2()
38-
@available(OSX, deprecated: 10.10)
39-
class func method3()
40-
@available(OSX, deprecated: 10.10)
41-
func method3()
42-
@available(OSX, introduced: 10.1, deprecated: 10.10, obsoleted: 10.11)
43-
class func method4()
44-
@available(OSX, introduced: 10.1, deprecated: 10.10, obsoleted: 10.11)
45-
func method4()
46-
}

test/IDE/Inputs/print_clang_header/header-to-print.h.printed.txt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,3 @@ protocol Superproto {
2828

2929
class MyLittleCFType : _CFObject {
3030
}
31-
32-
class MaybeAvailable {
33-
@available(OSX 10.1, *)
34-
class func method1()
35-
@available(OSX 10.1, *)
36-
func method1()
37-
@available(OSX 10.1, *)
38-
class func method2()
39-
@available(OSX 10.1, *)
40-
func method2()
41-
@available(OSX, deprecated: 10.10)
42-
class func method3()
43-
@available(OSX, deprecated: 10.10)
44-
func method3()
45-
@available(OSX, introduced: 10.1, deprecated: 10.10, obsoleted: 10.11)
46-
class func method4()
47-
@available(OSX, introduced: 10.1, deprecated: 10.10, obsoleted: 10.11)
48-
func method4()
49-
}

0 commit comments

Comments
 (0)