From c0b70def210edfa52c0165682fecf080166b468f Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Sat, 28 Aug 2021 00:09:27 +0000 Subject: [PATCH] Specify argument to be `const` for `debugString()` helper (NFC) This allows using this helper with rvalues. --- mlir/include/mlir/Support/DebugStringHelper.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mlir/include/mlir/Support/DebugStringHelper.h b/mlir/include/mlir/Support/DebugStringHelper.h index 92acc4f..0a94388 100644 --- a/mlir/include/mlir/Support/DebugStringHelper.h +++ b/mlir/include/mlir/Support/DebugStringHelper.h @@ -24,7 +24,8 @@ namespace mlir { // Simple helper function that returns a string as printed from a op. -template static std::string debugString(T &op) { +template +static std::string debugString(const T &op) { std::string instr_str; llvm::raw_string_ostream os(instr_str); op.print(os); -- 2.7.4