1/* Compile with: 2 cat >modules.modulemap <<EOF 3 module Parent { 4 module Child { 5 header "Child.h" 6 } 7 module Empty { 8 header "Empty.h" 9 } 10 } 11EOF 12 clang -D CHILD_H -E -o Child.h submodules.m 13 touch empty.h 14 clang -cc1 -emit-obj -fmodules -fmodule-map-file=modules.modulemap \ 15 -fmodule-format=obj -g -dwarf-ext-refs -fmodules-cache-path=. \ 16 -fdisable-module-hash submodules.m -o 1.o 17*/ 18 19// RUN: llvm-dsymutil -f -oso-prepend-path=%p/../Inputs/submodules \ 20// RUN: -y %p/dummy-debug-map.map -o - \ 21// RUN: | llvm-dwarfdump --debug-dump=info - | FileCheck %s 22 23// --------------------------------------------------------------------- 24#ifdef CHILD_H 25// --------------------------------------------------------------------- 26 27// CHECK: DW_TAG_compile_unit 28// CHECK-NOT: DW_TAG 29// CHECK: DW_TAG_module 30// CHECK-NEXT: DW_AT_name{{.*}}"Parent" 31// CHECK: DW_TAG_module 32// CHECK-NEXT: DW_AT_name{{.*}}"Child" 33// CHECK: DW_TAG_structure_type 34// CHECK-NOT: DW_TAG 35// CHECK: DW_AT_name {{.*}}"PruneMeNot" 36struct PruneMeNot; 37 38// --------------------------------------------------------------------- 39#else 40// --------------------------------------------------------------------- 41 42// CHECK: DW_TAG_compile_unit 43// CHECK: DW_TAG_module 44// CHECK-NEXT: DW_AT_name{{.*}}"Parent" 45// CHECK: 0x0[[EMPTY:.*]]: DW_TAG_module 46// CHECK-NEXT: DW_AT_name{{.*}}"Empty" 47 48// CHECK: DW_AT_import {{.*}}0x{{0*}}[[EMPTY]] 49@import Parent.Child; 50@import Parent.Empty; 51int main(int argc, char **argv) { return 0; } 52#endif 53