File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
flang/lib/Optimizer/OpenMP Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,6 @@ class MapsForPrivatizedSymbolsPass
55
55
std::underlying_type_t <llvm::omp::OpenMPOffloadMappingFlags>>(
56
56
llvm::omp::OpenMPOffloadMappingFlags::OMP_MAP_TO);
57
57
Operation *definingOp = var.getDefiningOp ();
58
- assert (definingOp &&
59
- " Privatizing a block argument without any hlfir.declare" );
60
58
61
59
Value varPtr = var;
62
60
// We want the first result of the hlfir.declare op because our goal
@@ -66,7 +64,7 @@ class MapsForPrivatizedSymbolsPass
66
64
// Some types are boxed immediately before privatization. These have other
67
65
// operations in between the privatization and the declaration. It is safe
68
66
// to use var directly here because they will be boxed anyway.
69
- if (auto declOp = llvm::dyn_cast <hlfir::DeclareOp>(definingOp))
67
+ if (auto declOp = llvm::dyn_cast_if_present <hlfir::DeclareOp>(definingOp))
70
68
varPtr = declOp.getBase ();
71
69
72
70
// If we do not have a reference to descritor, but the descriptor itself
You can’t perform that action at this time.
0 commit comments