Skip to content

Commit 70ba174

Browse files
committed
use cast_or_null
1 parent d8e0447 commit 70ba174

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Target/LLVMIR/ModuleImport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ static Attribute convertCGProfileModuleFlagValue(ModuleOp mlirModule,
523523
llvm::MDTuple *mdTuple) {
524524
auto getFunctionSymbol =
525525
[&](const llvm::MDOperand &funcMDO) -> std::optional<FlatSymbolRefAttr> {
526-
auto *f = dyn_cast_or_null<llvm::ValueAsMetadata>(funcMDO);
526+
auto *f = cast_or_null<llvm::ValueAsMetadata>(funcMDO);
527527
// nullptr is a valid value for the function pointer.
528528
if (!f)
529529
return std::nullopt;

0 commit comments

Comments
 (0)