Use a universal reference (&& instead of const &) for debugString() helper (NFC)

Some classes like mlir::Operation have a non-const print() method.
This commit is contained in:
Mehdi Amini
2021-08-28 00:40:28 +00:00
parent 32b280809f
commit 4387975170

View File

@@ -25,7 +25,7 @@ namespace mlir {
// Simple helper function that returns a string as printed from a op.
template <typename T>
static std::string debugString(const T &op) {
static std::string debugString(const T &&op) {
std::string instr_str;
llvm::raw_string_ostream os(instr_str);
op.print(os);