================ @@ -149,6 +149,29 @@ void DescriptorTableClause::dump(raw_ostream &OS) const { OS << ")"; } +// Helper struct so that we can use the overloaded notation of std::visit +template <class... Ts> struct OverloadMethods : Ts... { + using Ts::operator()...; +}; + +template <class... Ts> OverloadMethods(Ts...) -> OverloadMethods<Ts...>; + +void dumpRootElements(raw_ostream &OS, ArrayRef<RootElement> Elements) { + OS << "RootElements{"; + bool First = true; + for (auto Element : Elements) { ---------------- bogner wrote:
`auto` is forcing a copy here, it should be `const auto &`. That said, I'd prefer `const RootElement &` anyways, as `auto` really isn't helping anyway. https://github.com/llvm/llvm-project/pull/137690 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits