Skip to content

Commit ad4d725

Browse files
committed
[AST] Print "__owned" and "__shared" with leading underscores
The type printer was being optimistic about these, but that's a problem for testing textual interfaces right now.
1 parent d3bd01e commit ad4d725

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

lib/AST/TypeRepr.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,10 +572,10 @@ void SpecifierTypeRepr::printImpl(ASTPrinter &Printer,
572572
Printer.printKeyword("inout");
573573
break;
574574
case TypeReprKind::Shared:
575-
Printer.printKeyword("shared");
575+
Printer.printKeyword("__shared");
576576
break;
577577
case TypeReprKind::Owned:
578-
Printer.printKeyword("owned");
578+
Printer.printKeyword("__owned");
579579
break;
580580
default:
581581
llvm_unreachable("unknown specifier type repr");

test/ModuleInterface/smoke-test.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// RUN: %target-swift-frontend -emit-interface-path - -emit-module -o /dev/null %s | %FileCheck %s
2-
// RUN: %target-swift-frontend -emit-interface-path - -emit-module -o /dev/null %s %S/Inputs/other.swift | %FileCheck -check-prefix CHECK-MULTI-FILE %s
2+
// RUN: %target-swift-frontend -emit-interface-path - -emit-module -o /dev/null %s %S/Inputs/other.swift | %FileCheck -check-prefix CHECK -check-prefix CHECK-MULTI-FILE %s
33

44
// CHECK: public func verySimpleFunction(){{$}}
5-
// CHECK-MULTI-FILE: public func verySimpleFunction(){{$}}
65
public func verySimpleFunction() {}
76

7+
// CHECK: public func ownership(_ x: __shared AnyObject){{$}}
8+
public func ownership(_ x: __shared AnyObject) {}
9+
810
// CHECK-MULTI-FILE: public func otherFileFunction(){{$}}

0 commit comments

Comments
 (0)