diff options
| author | Matthias Braun <matze@braunis.de> | 2015-12-03 23:00:28 +0000 |
|---|---|---|
| committer | Matthias Braun <matze@braunis.de> | 2015-12-03 23:00:28 +0000 |
| commit | 149b859c55d137fef9f68ecb4506c931d12189ac (patch) | |
| tree | 14349579b18ba1566a56cfc00e2cbd9ecc6ae8de /llvm/lib/CodeGen/SelectionDAG | |
| parent | bcd09fef72e54ac328ec75e940c8b24e28225b6c (diff) | |
| download | bcm5719-llvm-149b859c55d137fef9f68ecb4506c931d12189ac.tar.gz bcm5719-llvm-149b859c55d137fef9f68ecb4506c931d12189ac.zip | |
Revert "raw_ostream: << operator for callables with raw_stream argument"
This commit provoked "error C2593: 'operator <<' is ambiguous" on MSVC.
This reverts commit r254655.
llvm-svn: 254661
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp index 8c3a0f2d81e..d362f98d646 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp @@ -369,14 +369,25 @@ const char *SDNode::getIndexedModeName(ISD::MemIndexedMode AM) { } } -static Printable PrintNodeId(const SDNode &Node) { - return [&Node](raw_ostream &OS) { +namespace { +class PrintNodeId { + const SDNode &Node; +public: + explicit PrintNodeId(const SDNode &Node) + : Node(Node) {} + void print(raw_ostream &OS) const { #ifndef NDEBUG OS << 't' << Node.PersistentId; #else OS << (const void*)&Node; #endif - }; + } +}; + +static inline raw_ostream &operator<<(raw_ostream &OS, const PrintNodeId &P) { + P.print(OS); + return OS; +} } void SDNode::dump() const { dump(nullptr); } |

