[llvm] [Clang] [OMPIRBuilder] Add Assertion to Prevent Null Pointer Dereference in OpenMP IR Builder (PR #115506)
Mariya Podchishchaeva via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 12 06:23:43 PST 2024
================
@@ -6966,6 +6966,10 @@ static Function *emitTargetTaskProxyFunction(OpenMPIRBuilder &OMPBuilder,
auto *ArgStructType =
dyn_cast<StructType>(ArgStructAlloca->getAllocatedType());
----------------
Fznamznon wrote:
I see that it does the same thing that is already done in the function but still, why can't we use a `cast` instead of `dyn_cast` + assert since it is how LLVM coding guidelines suggest to do?
https://github.com/llvm/llvm-project/pull/115506
More information about the llvm-commits
mailing list