Skip to content

Commit b7e5765

Browse files
committed
Update cast
1 parent 79e99b9 commit b7e5765

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Target/LLVMIR/Transforms/TargetUtils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ getTargetMachine(mlir::LLVM::TargetAttrInterface attr) {
4141
// NB: `TargetAttrInterface::getFeatures()` is coarsely typed to work around
4242
// cyclic dependency issue in tablegen files.
4343
auto featuresAttr =
44-
llvm::cast_or_null<LLVM::TargetFeaturesAttr>(attr.getFeatures());
44+
llvm::cast_if_present<LLVM::TargetFeaturesAttr>(attr.getFeatures());
4545
std::string features = featuresAttr ? featuresAttr.getFeaturesString() : "";
4646

4747
std::string error;

0 commit comments

Comments
 (0)