diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainVariables.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainVariables.java index 7df146d182116c..07864df5a401ba 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainVariables.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainVariables.java @@ -968,56 +968,6 @@ public int hashCode() { } } - /** - * A sequence of structure values. Exists as a memory optimization - a typical build can contain - * millions of feature values, so getting rid of the overhead of {@code StructureValue} objects - * significantly reduces memory overhead. - */ - @Immutable - private static final class StructureSequence extends VariableValueAdapter { - private final ImmutableList> values; - - private StructureSequence(ImmutableList> values) { - Preconditions.checkNotNull(values); - this.values = values; - } - - @Override - public Iterable getSequenceValue(String variableName) { - final ImmutableList.Builder sequences = ImmutableList.builder(); - for (ImmutableMap value : values) { - sequences.add(new StructureValue(value)); - } - return sequences.build(); - } - - @Override - public String getVariableTypeName() { - return Sequence.SEQUENCE_VARIABLE_TYPE_NAME; - } - - @Override - public boolean isTruthy() { - return !values.isEmpty(); - } - - @Override - public boolean equals(Object other) { - if (!(other instanceof StructureSequence)) { - return false; - } - if (this == other) { - return true; - } - return Objects.equals(values, ((StructureSequence) other).values); - } - - @Override - public int hashCode() { - return values.hashCode(); - } - } - /** * A sequence of simple string values. Exists as a memory optimization - a typical build can * contain millions of feature values, so getting rid of the overhead of {@code StringValue} @@ -1135,7 +1085,7 @@ public int hashCode() { /** * Single structure value. Be careful not to create sequences of single structures, as the memory - * overhead is prohibitively big. Use optimized {@link StructureSequence} instead. + * overhead is prohibitively big. */ @Immutable private static final class StructureValue extends VariableValueAdapter {