Remove `const` from `const T &&` in debugString() helper to make it a universal refer...
authorMehdi Amini <joker.eph@gmail.com>
Sat, 28 Aug 2021 01:09:00 +0000 (01:09 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Sat, 28 Aug 2021 01:09:00 +0000 (01:09 +0000)
It broke lvalue arguments otherwise:

mlir/include/mlir/Support/DebugStringHelper.h

index 0a52f18..34eec76 100644 (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(T &&op) {
   std::string instr_str;
   llvm::raw_string_ostream os(instr_str);
   op.print(os);