================ @@ -308,6 +312,94 @@ inline constexpr ExtensionInfo Extensions[] = { }; // clang-format on +struct ExtensionSet { + // Set of extensions which are currently enabled. + ExtensionBitset Enabled; + // Set of extensions which have been enabled or disabled at any point. Used + // to avoid cluttering the cc1 command-line with lots of unneeded features. + ExtensionBitset Touched; + // Base architecture version, which we need to know because some feature + // dependencies change depending on this. + const ArchInfo *BaseArch; + + ExtensionSet() : Enabled(), Touched(), BaseArch(nullptr) {} + + // Enable the given architecture extension, and any other extensions it + // depends on. + void enable(ArchExtKind E); + // Disable the given architecture extension, and any other extensions which + // depend on it. ---------------- DavidSpickett wrote:
Is this exhaustive? If `a` depends on `b` and `c`, I would get `a+b+c`. Then if I disable `a`, am I left with `b+c`? https://github.com/llvm/llvm-project/pull/78270 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits