[PATCH] D142932: Multilib YAML parsing

Michael Platings via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 6 10:42:05 PDT 2023


michaelplatings marked 2 inline comments as done.
michaelplatings added inline comments.


================
Comment at: clang/include/clang/Driver/Multilib.h:150-152
+  bool parseYaml(llvm::MemoryBufferRef,
+                 llvm::SourceMgr::DiagHandlerTy = nullptr,
+                 void *DiagHandlerCtxt = nullptr);
----------------
phosek wrote:
> Rather than `parseYaml` modifying the state of `MultilibSet`, can we instead have a static factory method or a standalone function that parses, constructs and returns `llvm::Expected<MultilibSet>`. That's more in line with how we handle YAML deserialization elsewhere in LLVM, and also follows the notion of `MultilibSet` being immutable.
Done, although I used ErrorOr instead of Expected to allow passing the error directly from the yaml::Input object.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142932/new/

https://reviews.llvm.org/D142932



More information about the cfe-commits mailing list