forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More aggressively deduplicate global warnings based on contents. (llv…
…m#112801) 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
- Loading branch information
1 parent
02bf3b5
commit 697a455
Showing
4 changed files
with
61 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# 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 |