diff options
| author | Eric Christopher <echristo@gmail.com> | 2015-12-18 18:55:22 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2015-12-18 18:55:22 +0000 |
| commit | 42b56eefd81531fb676159d6e5ad58d8b3a85a31 (patch) | |
| tree | 3edd24401169fa801063943491ef6527304743c7 | |
| parent | 6c97f4c7d7570fd79695ba822456c3dbe48c752a (diff) | |
| download | bcm5719-llvm-42b56eefd81531fb676159d6e5ad58d8b3a85a31.tar.gz bcm5719-llvm-42b56eefd81531fb676159d6e5ad58d8b3a85a31.zip | |
Add a dump method for ArgList.
Patch by Justin Lebar!
llvm-svn: 256009
| -rw-r--r-- | llvm/include/llvm/Option/ArgList.h | 2 | ||||
| -rw-r--r-- | llvm/lib/Option/ArgList.cpp | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/llvm/include/llvm/Option/ArgList.h b/llvm/include/llvm/Option/ArgList.h index 0a78e935afa..c6ec08cb6d6 100644 --- a/llvm/include/llvm/Option/ArgList.h +++ b/llvm/include/llvm/Option/ArgList.h @@ -306,6 +306,8 @@ public: const char *GetOrMakeJoinedArgString(unsigned Index, StringRef LHS, StringRef RHS) const; + void dump() const; + /// @} }; diff --git a/llvm/lib/Option/ArgList.cpp b/llvm/lib/Option/ArgList.cpp index a37f443e56f..48f1a71d986 100644 --- a/llvm/lib/Option/ArgList.cpp +++ b/llvm/lib/Option/ArgList.cpp @@ -328,6 +328,13 @@ const char *ArgList::GetOrMakeJoinedArgString(unsigned Index, return MakeArgString(LHS + RHS); } +LLVM_DUMP_METHOD void ArgList::dump() const { + for (Arg *A : *this) { + llvm::errs() << "* "; + A->dump(); + } +} + // void InputArgList::releaseMemory() { |

