We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79e99b9 commit b7e5765Copy full SHA for b7e5765
mlir/lib/Target/LLVMIR/Transforms/TargetUtils.cpp
@@ -41,7 +41,7 @@ getTargetMachine(mlir::LLVM::TargetAttrInterface attr) {
41
// NB: `TargetAttrInterface::getFeatures()` is coarsely typed to work around
42
// cyclic dependency issue in tablegen files.
43
auto featuresAttr =
44
- llvm::cast_or_null<LLVM::TargetFeaturesAttr>(attr.getFeatures());
+ llvm::cast_if_present<LLVM::TargetFeaturesAttr>(attr.getFeatures());
45
std::string features = featuresAttr ? featuresAttr.getFeaturesString() : "";
46
47
std::string error;
0 commit comments