File tree 2 files changed +24
-0
lines changed 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,10 @@ Object serializePlatform(const Triple &T) {
104
104
Object Platform;
105
105
Platform[" architecture" ] = T.getArchName ();
106
106
Platform[" vendor" ] = T.getVendorName ();
107
+
108
+ if (!T.getEnvironmentName ().empty ())
109
+ Platform[" environment" ] = T.getEnvironmentName ();
110
+
107
111
Platform[" operatingSystem" ] = serializeOperatingSystem (T);
108
112
return Platform;
109
113
}
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -extract-api --pretty-sgf -triple arm64-apple-ios17.1-macabi \
2
+ // RUN: -x c-header %s -verify -o - | FileCheck %s
3
+
4
+ int a ;
5
+
6
+ // CHECK: "platform": {
7
+ // CHECK-NEXT: "architecture": "arm64",
8
+ // CHECK-NEXT: "environment": "macabi",
9
+ // CHECK-NEXT: "operatingSystem": {
10
+ // CHECK-NEXT: "minimumVersion": {
11
+ // CHECK-NEXT: "major": 14,
12
+ // CHECK-NEXT: "minor": 0,
13
+ // CHECK-NEXT: "patch": 0
14
+ // CHECK-NEXT: },
15
+ // CHECK-NEXT: "name": "ios"
16
+ // CHECK-NEXT: },
17
+ // CHECK-NEXT: "vendor": "apple"
18
+ // CHECK-NEXT: }
19
+
20
+ // expected-no-diagnostics
You can’t perform that action at this time.
0 commit comments