Specify argument to be `const` for `debugString()` helper (NFC)

This allows using this helper with rvalues.
This commit is contained in:
Mehdi Amini 2021-08-28 00:09:27 +00:00
parent 84013d7093
commit c0b70def21
1 changed files with 2 additions and 1 deletions

View File

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