steveire created this revision.
steveire added a reviewer: aaron.ballman.
Herald added a subscriber: cfe-commits.

Repository:
  rC Clang

https://reviews.llvm.org/D52870

Files:
  include/clang/AST/NestedNameSpecifier.h
  lib/AST/NestedNameSpecifier.cpp


Index: lib/AST/NestedNameSpecifier.cpp
===================================================================
--- lib/AST/NestedNameSpecifier.cpp
+++ lib/AST/NestedNameSpecifier.cpp
@@ -340,12 +340,22 @@
 }
 
 void NestedNameSpecifier::dump(const LangOptions &LO) const {
-  print(llvm::errs(), PrintingPolicy(LO));
+  dump(llvm::errs(), LO);
 }
 
-LLVM_DUMP_METHOD void NestedNameSpecifier::dump() const {
+void NestedNameSpecifier::dump() const {
+  dump(llvm::errs());
+}
+
+void NestedNameSpecifier::dump(llvm::raw_ostream& OS) const
+{
   LangOptions LO;
-  print(llvm::errs(), PrintingPolicy(LO));
+  dump(OS, LO);
+}
+
+LLVM_DUMP_METHOD void NestedNameSpecifier::dump(llvm::raw_ostream& OS, const 
LangOptions &LO) const
+{
+  print(OS, PrintingPolicy(LO));
 }
 
 unsigned
Index: include/clang/AST/NestedNameSpecifier.h
===================================================================
--- include/clang/AST/NestedNameSpecifier.h
+++ include/clang/AST/NestedNameSpecifier.h
@@ -225,6 +225,8 @@
   /// in debugging.
   void dump(const LangOptions &LO) const;
   void dump() const;
+  void dump(llvm::raw_ostream& OS) const;
+  void dump(llvm::raw_ostream& OS, const LangOptions &LO) const;
 };
 
 /// A C++ nested-name-specifier augmented with source location


Index: lib/AST/NestedNameSpecifier.cpp
===================================================================
--- lib/AST/NestedNameSpecifier.cpp
+++ lib/AST/NestedNameSpecifier.cpp
@@ -340,12 +340,22 @@
 }
 
 void NestedNameSpecifier::dump(const LangOptions &LO) const {
-  print(llvm::errs(), PrintingPolicy(LO));
+  dump(llvm::errs(), LO);
 }
 
-LLVM_DUMP_METHOD void NestedNameSpecifier::dump() const {
+void NestedNameSpecifier::dump() const {
+  dump(llvm::errs());
+}
+
+void NestedNameSpecifier::dump(llvm::raw_ostream& OS) const
+{
   LangOptions LO;
-  print(llvm::errs(), PrintingPolicy(LO));
+  dump(OS, LO);
+}
+
+LLVM_DUMP_METHOD void NestedNameSpecifier::dump(llvm::raw_ostream& OS, const LangOptions &LO) const
+{
+  print(OS, PrintingPolicy(LO));
 }
 
 unsigned
Index: include/clang/AST/NestedNameSpecifier.h
===================================================================
--- include/clang/AST/NestedNameSpecifier.h
+++ include/clang/AST/NestedNameSpecifier.h
@@ -225,6 +225,8 @@
   /// in debugging.
   void dump(const LangOptions &LO) const;
   void dump() const;
+  void dump(llvm::raw_ostream& OS) const;
+  void dump(llvm::raw_ostream& OS, const LangOptions &LO) const;
 };
 
 /// A C++ nested-name-specifier augmented with source location
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to