I've been getting complaints from users being spammed by -gmodules missing file warnings going out of control because each object file depends on an entire DAG of PCM files that usually are all missing at once. To reduce this problem, this patch does two things: 1. Module now maintains a DenseMap<hash, once> that is used to display each warning only once, based on its actual text. 2. The PCM warning itself is reworded to include less details, such as the DIE offset, which is only useful to LLDB developers, who can get this from the dwarf log if they need it. Because the detail is omitted the hashing from (1) deduplicates the warnings. rdar://138144624
23 lines
1.1 KiB
Plaintext
23 lines
1.1 KiB
Plaintext
# REQUIRES: system-darwin
|
|
# Test the rate-limiting of module not found warnings.
|
|
# RUN: rm -rf %t
|
|
# RUN: mkdir -p %t
|
|
|
|
# RUN: echo 'module "C" { header "c.h" }' >%t/module.modulemap
|
|
# RUN: echo 'struct c {};' >>%t/c.h
|
|
# RUN: echo '@import C;' >%t/a.m
|
|
# RUN: echo 'struct a { struct c c; } a;' >>%t/a.m
|
|
# RUN: echo '@import C;' >%t/b.m
|
|
# RUN: echo 'struct b { struct c c; } b;' >>%t/b.m
|
|
# RUN: echo 'int main() {}' >>%t/b.m
|
|
|
|
# RUN: %clang_host -fmodules -Xclang -fmodules-cache-path=%t/cache -I%t -g -gmodules %t/a.m -o %t/a.o -c
|
|
# RUN: %clang_host -fmodules -Xclang -fmodules-cache-path=%t/cache -I%t -g -gmodules %t/b.m -o %t/b.o -c
|
|
# RUN: %clang_host %t/a.o %t/b.o -o %t/a.out
|
|
# RUN: rm -rf %t/cache
|
|
# RUN: %lldb %t/a.out -o "b main" -o run -o "p a" -o "p b" -o q 2>&1 | FileCheck %s
|
|
# CHECK: {{[ab]}}.o{{.*}}/cache/{{.*}}/C-{{.*}}.pcm' does not exist
|
|
# CHECK-NOT: /cache/{{.*}}/C-{.*}.pcm' does not exist
|
|
# CHECK: {{[ab]}}.o{{.*}}/cache/{{.*}}/C-{{.*}}.pcm' does not exist
|
|
# CHECK-NOT: /cache/{{.*}}/C-{.*}.pcm' does not exist
|