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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to