Skip to content

Commit

Permalink
Make SingleImpl warning quieter
Browse files Browse the repository at this point in the history
Summary: Print a single warning to re-run with tracing.

Reviewed By: ssj933

Differential Revision: D27756716

fbshipit-source-id: fd8ac80be762fbe54a0ff08f6d9ce094e1861aa2
  • Loading branch information
agampe authored and facebook-github-bot committed Apr 15, 2021
1 parent dfe6074 commit 01109ca
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion opt/singleimpl/SingleImplAnalyze.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,14 @@ void AnalysisImpl::escape_cross_stores() {
if (cls != nullptr) {
if (xstores.illegal_ref_load_types(intf_it.first, cls)) {
escape_interface(intf_it.first, CROSS_STORES);
TRACE(INTF, 0,
static bool warned = false;
if (!warned) {
warned = true;
TRACE(INTF, 0,
"Found transitive cross store violation! For details, run with "
"TRACE=INTF:1.");
}
TRACE(INTF, 1,
"Warning: found %s which is by itself not a cross-store "
"violation for %s but depends on other types that are!",
SHOW(cls), SHOW(intf_it.first));
Expand Down

0 comments on commit 01109ca

Please sign in to comment.