r182620 - Constify the 'dump' method so that it can be called by a const object.
Bill Wendling
isanbard at gmail.com
Thu May 23 16:10:23 PDT 2013
Author: void
Date: Thu May 23 18:10:23 2013
New Revision: 182620
URL: http://llvm.org/viewvc/llvm-project?rev=182620&view=rev
Log:
Constify the 'dump' method so that it can be called by a const object.
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=182620&r1=182619&r2=182620&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/ArgList.h (original)
+++ cfe/trunk/include/clang/Driver/ArgList.h Thu May 23 18:10:23 2013
@@ -300,7 +300,7 @@ namespace driver {
/// @}
- void dump();
+ void dump() const;
};
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=182620&r1=182619&r2=182620&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ArgList.cpp (original)
+++ cfe/trunk/lib/Driver/ArgList.cpp Thu May 23 18:10:23 2013
@@ -321,11 +321,10 @@ const char *ArgList::GetOrMakeJoinedArgS
return MakeArgString(LHS + RHS);
}
-void ArgList::dump() {
+void ArgList::dump() const {
llvm::errs() << "ArgList:";
- for (iterator it = begin(), ie = end(); it != ie; ++it) {
+ for (const_iterator it = begin(), ie = end(); it != ie; ++it)
llvm::errs() << " " << (*it)->getSpelling();
- }
llvm::errs() << "\n";
}
More information about the cfe-commits
mailing list