From 4387975170112ad51a6cb57b5b77ebd72cc73c57 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Sat, 28 Aug 2021 00:40:28 +0000 Subject: [PATCH] Use a universal reference (&& instead of const &) for `debugString()` helper (NFC) Some classes like mlir::Operation have a non-const print() method. --- mlir/include/mlir/Support/DebugStringHelper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/include/mlir/Support/DebugStringHelper.h b/mlir/include/mlir/Support/DebugStringHelper.h index 0a943880814d..0a52f1853e49 100644 --- a/mlir/include/mlir/Support/DebugStringHelper.h +++ b/mlir/include/mlir/Support/DebugStringHelper.h @@ -25,7 +25,7 @@ namespace mlir { // Simple helper function that returns a string as printed from a op. template -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);