[clang] [llvm] [DirectX] add Function name to DiagnosticInfoUnsupported Msg in DXILOpLowering (PR #136234)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 18 10:12:40 PDT 2025


farzonl wrote:

> This doesn't seem right. Are we just misusing `DiagnosticInfoUnsupported` here? The `Function` argument for `DiagnosticInfoWithLocationBase` is clearly meant to be part of the location (as evidenced by the "in function XYZ" part of the message). I suspect that we should really be changing the unknown intrinsic diagnostic to use `DiagnosticInfoGeneric` rather than `DiagnosticInfoUnsupported`, and we should probably update the other use of `DiagnosticInfoUnsupported` in `OpLowerer::replaceFunction` to use `DiagnosticInfoGenericWithLoc` and pass in the parent function of the `CallInst` rather than the callee.

Thats option 5. we would still want to encode the intrinsic name in the message but if we used `DiagnosticInfoGeneric` the message string and the print would be the same.

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


More information about the llvm-commits mailing list