================ @@ -657,7 +657,7 @@ MCPseudoProbeDecoder::getCallProbeForAddr(uint64_t Address) const { const auto &Probes = It->second; const MCDecodedPseudoProbe *CallProbe = nullptr; - for (const auto &Probe : Probes) { ---------------- aaupov wrote:
In #102789, `Probes` become `std::vector<std::reference_wrapper<MCDecodedPseudoProbe>>`. `auto` would expand to a reference_wrapper, so to access the underlying pseudo probe, it would need explicit `get`. To avoid that, we can use `reference_wrapper::operator T&` which is functionally identical to `get`. This is achieved by providing `MCDecodedPseudoProbe &` as type of a range-based variable. https://en.cppreference.com/w/cpp/utility/functional/reference_wrapper/get https://github.com/llvm/llvm-project/pull/102788 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits