[llvm] [offload] Add opt-in `std::ostream` support to OffloadPrint.hpp (PR #222269)
Jan Trusiłło via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 06:11:30 PDT 2026
311Volt wrote:
> If these printing routines are independent of the underlying runtime and are just user level helpers, then we should just always use std::ostream and drop LLVM.
They're used by OffloadImpl.cpp, and as far as I'm aware the LLVM iostream ban definitely applies there.
Rewrote PR to remove the `OFFLOAD_PRINT_USE_STD_OSTREAM` option and instead offer 2 headers, `OffloadPrintRaw.hpp` and `OffloadPrintStd.hpp` as suggested by @pbalcer.
I think the right thing to do eventually is to make offload-tblgen output .inc files with plain x-macro invocation lists, and implement the printing functionality on top of that. That's a larger patch, though, and I think it's valuable to offer a printing header that's usable downstream before that happens.
https://github.com/llvm/llvm-project/pull/222269
More information about the llvm-commits
mailing list