summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mlir/include/mlir/Pass/PassOptions.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/mlir/include/mlir/Pass/PassOptions.h b/mlir/include/mlir/Pass/PassOptions.h
index 0ecb7ba970a..01a4b43a185 100644
--- a/mlir/include/mlir/Pass/PassOptions.h
+++ b/mlir/include/mlir/Pass/PassOptions.h
@@ -83,22 +83,19 @@ private:
/// Utility methods for printing option values.
template <typename DataT>
- static void printOptionValue(raw_ostream &os,
- GenericOptionParser<DataT> &parser,
- const DataT &value) {
+ static void printValue(raw_ostream &os, GenericOptionParser<DataT> &parser,
+ const DataT &value) {
if (Optional<StringRef> argStr = parser.findArgStrForValue(value))
os << argStr;
else
llvm_unreachable("unknown data value for option");
}
template <typename DataT, typename ParserT>
- static void printOptionValue(raw_ostream &os, ParserT &parser,
- const DataT &value) {
+ static void printValue(raw_ostream &os, ParserT &parser, const DataT &value) {
os << value;
}
template <typename ParserT>
- static void printOptionValue(raw_ostream &os, ParserT &parser,
- const bool &value) {
+ static void printValue(raw_ostream &os, ParserT &parser, const bool &value) {
os << (value ? StringRef("true") : StringRef("false"));
}
@@ -129,7 +126,7 @@ public:
/// Print the name and value of this option to the given stream.
void print(raw_ostream &os) final {
os << this->ArgStr << '=';
- printOptionValue(os, this->getParser(), this->getValue());
+ printValue(os, this->getParser(), this->getValue());
}
/// Copy the value from the given option into this one.
@@ -172,7 +169,7 @@ public:
void print(raw_ostream &os) final {
os << this->ArgStr << '=';
auto printElementFn = [&](const DataType &value) {
- printOptionValue(os, this->getParser(), value);
+ printValue(os, this->getParser(), value);
};
interleave(*this, os, printElementFn, ",");
}
@@ -239,3 +236,4 @@ struct EmptyPipelineOptions : public PassPipelineOptions<EmptyPipelineOptions> {
} // end namespace mlir
#endif // MLIR_PASS_PASSOPTIONS_H_
+
OpenPOWER on IntegriCloud