scott.linder added inline comments.
================ Comment at: llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp:567 - if (auto HostcallFunction = M.getFunction("__ockl_hostcall_internal")) { + if (auto *HostcallFunction = M.getFunction("__ockl_hostcall_internal")) { for (auto &U : HostcallFunction->uses()) { ---------------- I will land this separately, as it is unrelated and NFC ================ Comment at: llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp:570 if (auto *CI = dyn_cast<CallInst>(U.getUser())) { - M.getContext().emitError( - CI, "Cannot use both printf and hostcall in the same module"); + M.getContext().diagnose(DiagnosticInfoInlineAsm( + *CI, "Cannot use both printf and hostcall in the same module", ---------------- I'm also not certain this is the the best option to classify the diagnostic, but it is what was used for the error so I just left it as-is. Suggestions welcome! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121951/new/ https://reviews.llvm.org/D121951 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits