[clang] [Multilib] Custom flags YAML parsing (PR #110657)

Simon Tatham via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 28 10:10:23 PDT 2024


================
@@ -101,6 +101,25 @@ class Multilib {
 
 raw_ostream &operator<<(raw_ostream &OS, const Multilib &M);
 
+namespace custom_flag {
+struct CustomFlagDeclaration;
+using CustomFlagDeclarationPtr = std::shared_ptr<CustomFlagDeclaration>;
+
+struct CustomFlagValueDetail {
+  std::string Name;
+  std::optional<SmallVector<std::string>> ExtraBuildArgs;
+  CustomFlagDeclarationPtr Decl;
+};
+
+struct CustomFlagDeclaration {
+  std::string Name;
+  SmallVector<CustomFlagValueDetail> ValueList;
+  size_t DefaultValueIdx = ~0UL;
----------------
statham-arm wrote:

Perhaps this would be clearer as an `optional<size_t>`?

https://github.com/llvm/llvm-project/pull/110657


More information about the cfe-commits mailing list