Skip to content

Commit c5ca712

Browse files
committed
Add cast instaed of dyn_cast<>
1 parent b988d27 commit c5ca712

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6963,12 +6963,7 @@ static Function *emitTargetTaskProxyFunction(OpenMPIRBuilder &OMPBuilder,
69636963
assert(ArgStructAlloca &&
69646964
"Unable to find the alloca instruction corresponding to arguments "
69656965
"for extracted function");
6966-
auto *ArgStructType =
6967-
dyn_cast<StructType>(ArgStructAlloca->getAllocatedType());
6968-
6969-
assert(ArgStructType &&
6970-
"Unable to find the struct type corresponding to the alloca "
6971-
"instruction");
6966+
auto *ArgStructType = cast<StructType>(ArgStructAlloca->getAllocatedType());
69726967

69736968
AllocaInst *NewArgStructAlloca =
69746969
Builder.CreateAlloca(ArgStructType, nullptr, "structArg");

0 commit comments

Comments
 (0)