[PATCH] D15631: Add dump() member function to ArgList.

Justin Lebar via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 16:47:46 PST 2015


jlebar created this revision.
jlebar added a reviewer: echristo.
jlebar added a subscriber: llvm-commits.

http://reviews.llvm.org/D15631

Files:
  include/llvm/Option/ArgList.h
  lib/Option/ArgList.cpp

Index: lib/Option/ArgList.cpp
===================================================================
--- lib/Option/ArgList.cpp
+++ lib/Option/ArgList.cpp
@@ -328,6 +328,13 @@
   return MakeArgString(LHS + RHS);
 }
 
+LLVM_DUMP_METHOD void ArgList::dump() const {
+  for (Arg *A : *this) {
+    llvm::errs() << "* ";
+    A->dump();
+  }
+}
+
 //
 
 void InputArgList::releaseMemory() {
Index: include/llvm/Option/ArgList.h
===================================================================
--- include/llvm/Option/ArgList.h
+++ include/llvm/Option/ArgList.h
@@ -306,6 +306,8 @@
   const char *GetOrMakeJoinedArgString(unsigned Index, StringRef LHS,
                                         StringRef RHS) const;
 
+  void dump() const;
+
   /// @}
 };
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15631.43197.patch
Type: text/x-patch
Size: 753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151218/d8381c17/attachment.bin>


More information about the llvm-commits mailing list