diff options
Diffstat (limited to 'mlir/lib/TableGen/Operator.cpp')
| -rw-r--r-- | mlir/lib/TableGen/Operator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/TableGen/Operator.cpp b/mlir/lib/TableGen/Operator.cpp index bd3e3b1c6b7c..76af82a827da 100644 --- a/mlir/lib/TableGen/Operator.cpp +++ b/mlir/lib/TableGen/Operator.cpp @@ -798,14 +798,14 @@ const InferredResultType &Operator::getInferredResultType(int index) const { ArrayRef<SMLoc> Operator::getLoc() const { return def.getLoc(); } bool Operator::hasDescription() const { - return def.getValue("description") != nullptr; + return !getDescription().trim().empty(); } StringRef Operator::getDescription() const { return def.getValueAsString("description"); } -bool Operator::hasSummary() const { return def.getValue("summary") != nullptr; } +bool Operator::hasSummary() const { return !getSummary().trim().empty(); } StringRef Operator::getSummary() const { return def.getValueAsString("summary"); |
