r175777 - [driver] Add a dump method for ArgList.
Chad Rosier
mcrosier at apple.com
Thu Feb 21 10:40:49 PST 2013
Author: mcrosier
Date: Thu Feb 21 12:40:49 2013
New Revision: 175777
URL: http://llvm.org/viewvc/llvm-project?rev=175777&view=rev
Log:
[driver] Add a dump method for ArgList.
Modified:
cfe/trunk/include/clang/Driver/ArgList.h
cfe/trunk/lib/Driver/ArgList.cpp
Modified: cfe/trunk/include/clang/Driver/ArgList.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/ArgList.h?rev=175777&r1=175776&r2=175777&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/ArgList.h (original)
+++ cfe/trunk/include/clang/Driver/ArgList.h Thu Feb 21 12:40:49 2013
@@ -290,6 +290,8 @@ namespace driver {
StringRef RHS) const;
/// @}
+
+ void dump();
};
class InputArgList : public ArgList {
Modified: cfe/trunk/lib/Driver/ArgList.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ArgList.cpp?rev=175777&r1=175776&r2=175777&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ArgList.cpp (original)
+++ cfe/trunk/lib/Driver/ArgList.cpp Thu Feb 21 12:40:49 2013
@@ -306,6 +306,14 @@ const char *ArgList::GetOrMakeJoinedArgS
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,
More information about the cfe-commits
mailing list