farzonl wrote:

>I am indeed asserting that many of the other uses of report_fatal_error in 
>this file are also wrong. However, you're probably right that it makes sense 
>to the existing pattern for now and clean this all up in a cohesive change.

Thanks for clarifying. Making a comprehensive change works for me.

> If the case is impossible why isn't this just an assert? In any case "failing 
> immediately" and "causing the program to crash" are different things, and 
> report_fatal_error is the latter.

Its impossible from clang, but anyone can invoke this intrinsic from opt\llc 
and so wanted a fail fast that we could test so no one thought they could use 
this intrinsic if the extention mode was opencl.

> IMO this is an argument for making a change that adds error handling to both 
> functions before this PR, so that we don't end up in a state where the 
> codebase is inconsistent.

I actually agree with this, but this funnction was marked `[[maybe_unused]]` so 
felt we need a use before making alteration. Plus we need an opencl counter 
part to test and we didn't have that until  #124045 was filed.



https://github.com/llvm/llvm-project/pull/125599
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to