Skip to content

Commit

Permalink
Remove dead code from CppCompileAction.java.
Browse files Browse the repository at this point in the history
VALIDATION_DEBUG_WARN is always false and no other references exist, so this should be safe?

RELNOTES: None.
PiperOrigin-RevId: 543681170
Change-Id: Ieef1262681ad8c75c63bc157d25d36f73496d38f
  • Loading branch information
philwo authored and copybara-github committed Jun 27, 2023
1 parent b652d6d commit 5fa4718
Showing 1 changed file with 0 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Iterables;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import com.google.common.io.ByteStreams;
import com.google.devtools.build.lib.actions.AbstractAction;
import com.google.devtools.build.lib.actions.ActionEnvironment;
Expand Down Expand Up @@ -124,8 +123,6 @@ public class CppCompileAction extends AbstractAction implements IncludeScannable

private static final PathFragment BUILD_PATH_FRAGMENT = PathFragment.create("BUILD");

private static final boolean VALIDATION_DEBUG_WARN = false;

@VisibleForTesting static final String CPP_COMPILE_MNEMONIC = "CppCompile";
@VisibleForTesting static final String OBJC_COMPILE_MNEMONIC = "ObjcCompile";

Expand Down Expand Up @@ -1058,29 +1055,6 @@ public void validateInclusions(
errors.add(input.getExecPath().toString());
}
}
if (VALIDATION_DEBUG_WARN) {
synchronized (System.err) {
if (errors.hasProblems()) {
if (errors.hasProblems()) {
System.err.println("ERROR: Include(s) were not in declared srcs:");
} else {
System.err.println(
"INFO: Include(s) were OK for '" + getSourceFile() + "', declared srcs:");
}
for (Artifact a : ccCompilationContext.getDeclaredIncludeSrcs().toList()) {
System.err.println(" '" + a.toDetailString() + "'");
}
System.err.println(" or under loose headers dirs:");
for (PathFragment f : Sets.newTreeSet(ccCompilationContext.getLooseHdrsDirs().toList())) {
System.err.println(" '" + f + "'");
}
System.err.println(" with prefixes:");
for (PathFragment dirpath : ccCompilationContext.getQuoteIncludeDirs()) {
System.err.println(" '" + dirpath + "'");
}
}
}
}
errors.assertProblemFree(this, getSourceFile());
}

Expand Down

0 comments on commit 5fa4718

Please sign in to comment.