File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 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) {
104104 Object Platform;
105105 Platform[" architecture" ] = T.getArchName ();
106106 Platform[" vendor" ] = T.getVendorName ();
107+
108+ if (!T.getEnvironmentName ().empty ())
109+ Platform[" environment" ] = T.getEnvironmentName ();
110+
107111 Platform[" operatingSystem" ] = serializeOperatingSystem (T);
108112 return Platform;
109113}
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