2 # cat >modules.modulemap <<EOF
12 # echo 'typedef int bar;' >Bar.h
13 # echo '@import Bar; typedef bar foo;' >Foo.h
14 # echo '@import Foo; foo f() { return 0; }' >module-warnings.m
15 # clang -cc1 -emit-obj -fmodules -fmodule-map-file=modules.modulemap \
16 # -fmodule-format=obj -debug-info-kind=standalone -dwarf-ext-refs \
17 # -fmodules-cache-path=ModuleCache \
18 # -fdisable-module-hash module-warnings.m -o 1.o
20 # Test for module-related warnings.
22 # RUN: rm -rf %t.dir && mkdir %t.dir && mkdir %t.dir/ModuleCache
23 # RUN: cp %p/../Inputs/module-warnings/1.o %t.dir
24 # RUN: cp %p/../Inputs/module-warnings/Foo.pcm %t.dir/ModuleCache
26 # RUN: dsymutil -verify -f -oso-prepend-path=%t.dir -y \
27 # RUN: %p/dummy-debug-map.map -o %t 2>&1 | FileCheck %s
29 # Module-not-found should be reported only once.
30 # The exact error message depends on the OS so we don't check for it.
31 # CHECK: warning: {{.*}}Bar.pcm:
32 # CHECK-NOT: warning: {{.*}}Bar.pcm:
34 # RUN: cp %p/../Inputs/module-warnings/libstatic.a %t.dir
35 # RUN: dsymutil -verify -f -oso-prepend-path=%t.dir -y %s -o %t 2>&1 | FileCheck %s
36 # CHECK: rebuild the module cache
37 # CHECK-NOT: static libraries
39 # RUN: rm -rf %t.dir/ModuleCache
40 # RUN: dsymutil -verify -f -oso-prepend-path=%t.dir -y %s -o %t 2>&1 \
41 # RUN: | FileCheck %s --check-prefix=STATIC
42 # STATIC: warning: {{.*}}Bar.pcm:
43 # STATIC: note: Linking a static library
44 # STATIC: warning: {{.*}}Foo.pcm:
45 # STATIC-NOT: warning:
48 triple: 'x86_64-apple-darwin'
50 - filename: libstatic.a(1.o)
52 - { sym: __Z3foov, objAddr: 0x0, binAddr: 0x10000, size: 0x10 }