File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -52,13 +52,15 @@ static void emitObjCConditional(raw_ostream &out,
52
52
}
53
53
54
54
static void writePtrauthPrologue (raw_ostream &os) {
55
- os << " #if __has_include(<ptrauth.h>)\n " ;
56
- os << " # include <ptrauth.h>\n " ;
57
- os << " #else\n " ;
58
- os << " # ifndef __ptrauth_swift_value_witness_function_pointer\n " ;
59
- os << " # define __ptrauth_swift_value_witness_function_pointer(x)\n " ;
60
- os << " # endif\n " ;
61
- os << " #endif\n " ;
55
+ emitCxxConditional (os, [&]() {
56
+ os << " #if __has_include(<ptrauth.h>)\n " ;
57
+ os << " # include <ptrauth.h>\n " ;
58
+ os << " #else\n " ;
59
+ os << " # ifndef __ptrauth_swift_value_witness_function_pointer\n " ;
60
+ os << " # define __ptrauth_swift_value_witness_function_pointer(x)\n " ;
61
+ os << " # endif\n " ;
62
+ os << " #endif\n " ;
63
+ });
62
64
}
63
65
64
66
static void writePrologue (raw_ostream &out, ASTContext &ctx,
Original file line number Diff line number Diff line change 35
35
// CHECK-NEXT: #include <stdbool.h>
36
36
// CHECK-NEXT: #include <string.h>
37
37
// CHECK-NEXT: #endif
38
+ // CHECK-NEXT: #if defined(__cplusplus)
38
39
// CHECK-NEXT: #if __has_include(<ptrauth.h>)
39
40
// CHECK-NEXT: # include <ptrauth.h>
40
41
// CHECK-NEXT: #else
41
42
// CHECK-NEXT: # ifndef __ptrauth_swift_value_witness_function_pointer
42
43
// CHECK-NEXT: # define __ptrauth_swift_value_witness_function_pointer(x)
43
44
// CHECK-NEXT: # endif
44
45
// CHECK-NEXT: #endif
46
+ // CHECK-NEXT: #endif
45
47
46
48
// CHECK-LABEL: !defined(SWIFT_TYPEDEFS)
47
49
// CHECK-NEXT: # define SWIFT_TYPEDEFS 1
You can’t perform that action at this time.
0 commit comments