diff options
3 files changed, 11 insertions, 11 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java index 8e8e27ced1..c675013b16 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppCompileAction.java @@ -419,8 +419,8 @@ public class CppCompileAction extends AbstractAction implements IncludeScannable } @Override - public Map<Artifact, Path> getLegalGeneratedScannerFileMap() { - Map<Artifact, Path> legalOuts = new HashMap<>(); + public Map<Artifact, Artifact> getLegalGeneratedScannerFileMap() { + Map<Artifact, Artifact> legalOuts = new HashMap<>(); for (Artifact a : context.getDeclaredIncludeSrcs()) { if (!a.isSourceArtifact()) { @@ -430,7 +430,7 @@ public class CppCompileAction extends AbstractAction implements IncludeScannable for (Pair<Artifact, Artifact> pregreppedSrcs : context.getPregreppedHeaders()) { Artifact hdr = pregreppedSrcs.getFirst(); Preconditions.checkState(!hdr.isSourceArtifact(), hdr); - legalOuts.put(hdr, pregreppedSrcs.getSecond().getPath()); + legalOuts.put(hdr, pregreppedSrcs.getSecond()); } return Collections.unmodifiableMap(legalOuts); } diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScannable.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScannable.java index 472e69bfde..f1a6e51478 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScannable.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScannable.java @@ -15,7 +15,6 @@ package com.google.devtools.build.lib.rules.cpp; import com.google.devtools.build.lib.actions.Artifact; -import com.google.devtools.build.lib.vfs.Path; import com.google.devtools.build.lib.vfs.PathFragment; import java.util.Collection; @@ -96,11 +95,12 @@ public interface IncludeScannable { Iterable<IncludeScannable> getAuxiliaryScannables(); /** - * Returns a map of generated files:files grepped for headers which may be reached during include - * scanning. Generated files which are reached, but not in the key set, must be ignored. + * Returns a map of (generated header:.includes file listing the header's includes) which may be + * reached during include scanning. Generated files which are reached, but not in the key set, + * must be ignored. * * <p>If grepping of output files is not enabled via --extract_generated_inclusions, keys * should just map to null. */ - Map<Artifact, Path> getLegalGeneratedScannerFileMap(); + Map<Artifact, Artifact> getLegalGeneratedScannerFileMap(); } diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScanner.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScanner.java index 82afb5c666..6a3f99ea29 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScanner.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScanner.java @@ -54,9 +54,9 @@ public interface IncludeScanner { * interpreted. */ public void process(Artifact mainSource, Collection<Artifact> sources, - Map<Artifact, Path> legalOutputPaths, List<String> cmdlineIncludes, Set<Artifact> includes, - ActionExecutionContext actionExecutionContext) throws IOException, ExecException, - InterruptedException; + Map<Artifact, Artifact> legalOutputPaths, List<String> cmdlineIncludes, + Set<Artifact> includes, ActionExecutionContext actionExecutionContext) + throws IOException, ExecException, InterruptedException; /** Supplies IncludeScanners upon request. */ interface IncludeScannerSupplier { @@ -107,7 +107,7 @@ public interface IncludeScanner { for (IncludeScannable scannable : Iterables.concat(ImmutableList.of(action), action.getAuxiliaryScannables())) { - Map<Artifact, Path> legalOutputPaths = scannable.getLegalGeneratedScannerFileMap(); + Map<Artifact, Artifact> legalOutputPaths = scannable.getLegalGeneratedScannerFileMap(); List<PathFragment> includeDirs = new ArrayList<>(scannable.getIncludeDirs()); List<PathFragment> quoteIncludeDirs = scannable.getQuoteIncludeDirs(); List<String> cmdlineIncludes = scannable.getCmdlineIncludes(); |