aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Driver/ArgList.h2
-rw-r--r--lib/Driver/ArgList.cpp8
2 files changed, 10 insertions, 0 deletions
diff --git a/include/clang/Driver/ArgList.h b/include/clang/Driver/ArgList.h
index 7763b3e969..3967dcc21d 100644
--- a/include/clang/Driver/ArgList.h
+++ b/include/clang/Driver/ArgList.h
@@ -290,6 +290,8 @@ namespace driver {
StringRef RHS) const;
/// @}
+
+ void dump();
};
class InputArgList : public ArgList {
diff --git a/lib/Driver/ArgList.cpp b/lib/Driver/ArgList.cpp
index 0058245203..6c57b622b8 100644
--- a/lib/Driver/ArgList.cpp
+++ b/lib/Driver/ArgList.cpp
@@ -306,6 +306,14 @@ const char *ArgList::GetOrMakeJoinedArgString(unsigned Index,
return MakeArgString(LHS + RHS);
}
+void ArgList::dump() {
+ llvm::errs() << "ArgList:";
+ for (iterator it = begin(), ie = end(); it != ie; ++it) {
+ llvm::errs() << " " << (*it)->getSpelling();
+ }
+ llvm::errs() << "\n";
+}
+
//
InputArgList::InputArgList(const char* const *ArgBegin,