projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32b2808
)
Use a universal reference (&& instead of const &) for `debugString()` helper (NFC)
author
Mehdi Amini
<joker.eph@gmail.com>
Sat, 28 Aug 2021 00:40:28 +0000
(
00:40
+0000)
committer
Mehdi Amini
<joker.eph@gmail.com>
Sat, 28 Aug 2021 00:41:41 +0000
(
00:41
+0000)
Some classes like mlir::Operation have a non-const print() method.
mlir/include/mlir/Support/DebugStringHelper.h
patch
|
blob
|
history
diff --git
a/mlir/include/mlir/Support/DebugStringHelper.h
b/mlir/include/mlir/Support/DebugStringHelper.h
index
0a94388
..
0a52f18
100644
(file)
--- 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(const T &
&
op) {
std::string instr_str;
llvm::raw_string_ostream os(instr_str);
op.print(os);