diff --git a/mlir/include/mlir/Support/DebugStringHelper.h b/mlir/include/mlir/Support/DebugStringHelper.h index 92acc4f515adb6..0a943880814db5 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);