-
Notifications
You must be signed in to change notification settings - Fork 10.4k
/
Copy pathSubmodulesNoExport.swift
40 lines (30 loc) · 1.09 KB
/
SubmodulesNoExport.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// RUN: %empty-directory(%t)
// RUN: split-file %s %t
// RUN: %target-swift-symbolgraph-extract -sdk %clang-importer-sdk -module-name SubmodulesNoExport -I %t/SubmodulesNoExport -output-dir %t -pretty-print -v
// RUN: %FileCheck %s --input-file %t/SubmodulesNoExport.symbols.json
// REQUIRES: objc_interop
// Make sure that a Clang module that declares submodules but doesn't have an export declaration
// still contains all the submodules' symbols.
//--- SubmodulesNoExport/module.modulemap
module SubmodulesNoExport {
header "SubmodulesNoExport.h"
module HeaderOne {
header "HeaderOne.h"
export *
}
module HeaderTwo {
header "HeaderTwo.h"
export *
}
}
//--- SubmodulesNoExport/SubmodulesNoExport.h
#include "HeaderOne.h"
#include "HeaderTwo.h"
// CHECK-DAG: "precise": "c:SubmodulesNoExport.h@umbrellaVar"
static int umbrellaVar = 0;
//--- SubmodulesNoExport/HeaderOne.h
// CHECK-DAG: "precise": "c:HeaderOne.h@varOne"
static int varOne = 1;
//--- SubmodulesNoExport/HeaderTwo.h
// CHECK-DAG: "precise": "c:HeaderTwo.h@varTwo"
static int varTwo = 2;