================
@@ -70,4 +70,21 @@ bool NestedBuildNamespace::operator<(const 
NestedBuildNamespace &Other) const {
   return Namespaces < Other.Namespaces;
 }
 
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const BuildNamespace &BN) 
{
+  OS << "BuildNamespace(" << toString(BN.Kind) << ", " << BN.Name << ")";
+  return OS;
+}
+
+llvm::raw_ostream &operator<<(llvm::raw_ostream &OS,
+                              const NestedBuildNamespace &NBN) {
+  OS << "NestedBuildNamespace([";
+  for (size_t I = 0; I < NBN.Namespaces.size(); ++I) {
+    if (I > 0)
+      OS << ", ";
+    OS << NBN.Namespaces[I];
+  }
----------------
steakhal wrote:

Be sure to also add `#include "llvm/ADT/STLExtras.h"`

```suggestion
  llvm::interleaveComma(NBN.Namespaces, OS);
```

https://github.com/llvm/llvm-project/pull/181765
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to