[Mlir-commits] [mlir] 022538f - Remove `const` from `const T &&` in debugString() helper to make it a universal reference (NFC)

Mehdi Amini llvmlistbot at llvm.org
Fri Aug 27 18:10:05 PDT 2021


Author: Mehdi Amini
Date: 2021-08-28T01:09:00Z
New Revision: 022538f2764a255bd2c0da3a247791e764933a93

URL: https://github.com/llvm/llvm-project/commit/022538f2764a255bd2c0da3a247791e764933a93
DIFF: https://github.com/llvm/llvm-project/commit/022538f2764a255bd2c0da3a247791e764933a93.diff

LOG: Remove `const` from `const T &&` in debugString() helper to make it a universal reference (NFC)

It broke lvalue arguments otherwise:

Added: 
    

Modified: 
    mlir/include/mlir/Support/DebugStringHelper.h

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Support/DebugStringHelper.h b/mlir/include/mlir/Support/DebugStringHelper.h
index 0a52f1853e49..34eec7676361 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 <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);


        


More information about the Mlir-commits mailing list