[llvm] [memprof] Add MemProf version (PR #86414)

via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 1 16:16:26 PDT 2024


dyung wrote:

> > We do see the same errors with `llvm/lib/ProfileData/InstrProfWriter.cpp`, I left it out since fixing one should fix both I think, sorry about that.
> 
> No apologies needed. I was just wondering about the differences between the two call sites of `formatv`.
> 
> > ```diff
> > diff --git a/llvm/include/llvm/Support/FormatProviders.h b/llvm/include/llvm/Support/FormatProviders.h
> > index aa0773847161..a83179f014b1 100644
> > --- a/llvm/include/llvm/Support/FormatProviders.h
> > +++ b/llvm/include/llvm/Support/FormatProviders.h
> > @@ -126,7 +126,7 @@ protected:
> >  template <typename T>
> >  struct format_provider<
> >      T, std::enable_if_t<detail::use_integral_formatter<T>::value>>
> > -    : public detail::HelperFunctions {
> > +    : public llvm::detail::HelperFunctions {
> > ```
> 
> @dyung Wow, thank you so much for looking into this. Adding `llvm::` may be a good practical fix if the host compiler doesn't find the correct overload. Would you like to create a PR for that?
> 
> > I'm still trying to figure out how to get the compiler to find the correct overload for `formatv` though.
> 
> So, the `llvm::` above isn't sufficient to fix the build?

It does not unfortunately. It seems there were two different, somewhat related issues. The first was the ambiguous llvm::detail, and the inability to resolve the call to `formatv`. The change I proposed fixes the former, but the latter is still there.

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


More information about the llvm-commits mailing list