Skip to content

Commit bea4aaf

Browse files
committed
Fixups
1 parent 38ac08d commit bea4aaf

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,19 +975,20 @@ def LLVM_TargetFeaturesAttr : LLVM_Attr<"TargetFeatures", "target_features">
975975
bool contains(::llvm::StringRef feature) const;
976976

977977
bool nullOrEmpty() const {
978-
// Checks if this attribute is fasly, or the features are empty.
978+
// Checks if this attribute is null, or the features are empty.
979979
return !bool(*this) || getFeatures().empty();
980980
}
981981

982982
/// Returns the list of features as an LLVM-compatible string.
983983
std::string getFeaturesString() const;
984984

985985
/// Finds the target features on the parent FunctionOpInterface.
986-
/// Note: This assumes the attribute is called "target_features".
986+
/// Note: This assumes the attribute name matches the return value of
987+
/// `getAttributeName()`.
987988
static TargetFeaturesAttr featuresAt(Operation* op);
988989

989990
/// Canonical name for this attribute within MLIR.
990-
static constexpr StringLiteral attributeName() {
991+
static constexpr StringLiteral getAttributeName() {
991992
return StringLiteral("target_features");
992993
}
993994
}];

mlir/lib/Dialect/LLVMIR/IR/LLVMAttrs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,5 +246,5 @@ TargetFeaturesAttr TargetFeaturesAttr::featuresAt(Operation *op) {
246246
if (!parentFunction)
247247
return {};
248248
return parentFunction.getOperation()->getAttrOfType<TargetFeaturesAttr>(
249-
attributeName());
249+
getAttributeName());
250250
}

0 commit comments

Comments
 (0)