diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationContext.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationContext.java index 242ed29f1e4bc0..de2c4a7649968e 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationContext.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationContext.java @@ -635,30 +635,6 @@ ImmutableList getNonTransitiveDefines() { return commandLineCcCompilationContext.localDefines; } - /** - * Returns a {@code CcCompilationContext} that is based on a given {@code CcCompilationContext} - * but returns empty sets for {@link #getLooseHdrsDirs()}. - */ - public static CcCompilationContext disallowUndeclaredHeaders( - CcCompilationContext ccCompilationContext) { - return new CcCompilationContext( - ccCompilationContext.commandLineCcCompilationContext, - ccCompilationContext.compilationPrerequisites, - NestedSetBuilder.emptySet(Order.STABLE_ORDER), - ccCompilationContext.declaredIncludeSrcs, - ccCompilationContext.nonCodeInputs, - ccCompilationContext.headerInfo, - ccCompilationContext.transitiveModules, - ccCompilationContext.transitivePicModules, - ccCompilationContext.directModuleMaps, - ccCompilationContext.exportingModuleMaps, - ccCompilationContext.cppModuleMap, - ccCompilationContext.propagateModuleMapAsActionInput, - ccCompilationContext.headersCheckingMode, - ccCompilationContext.virtualToOriginalHeaders, - ccCompilationContext.headerTokens); - } - /** * Returns a {@code CcCompilationContext} that is based on a given {@code CcCompilationContext}, * with {@code extraHeaderTokens} added to the header tokens. @@ -696,10 +672,6 @@ public ImmutableList getExportingModuleMaps() { return exportingModuleMaps; } - public CppConfiguration.HeadersCheckingMode getHeadersCheckingMode() { - return CppConfiguration.HeadersCheckingMode.STRICT; - } - public NestedSet getVirtualToOriginalHeaders() { return virtualToOriginalHeaders; } @@ -1147,13 +1119,6 @@ public Builder addVirtualToOriginalHeaders(NestedSet virtualToOriginalHea return this; } - /** Adds a set of header tokens. */ - @CanIgnoreReturnValue - public Builder addHeaderTokens(Iterable headerTokens) { - this.headerTokens.addAll(headerTokens); - return this; - } - /** Builds the {@link CcCompilationContext}. */ public CcCompilationContext build() { return build(