summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Option/ArgList.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-12-18 18:55:26 +0000
committerEric Christopher <echristo@gmail.com>2015-12-18 18:55:26 +0000
commit9a8b5e7ece3aa278355966bef0456a3523dd5211 (patch)
treec5bd39b5ea39cd956a40c41e547710143bff5f40 /llvm/lib/Option/ArgList.cpp
parent42b56eefd81531fb676159d6e5ad58d8b3a85a31 (diff)
downloadbcm5719-llvm-9a8b5e7ece3aa278355966bef0456a3523dd5211.tar.gz
bcm5719-llvm-9a8b5e7ece3aa278355966bef0456a3523dd5211.zip
Convert Arg, ArgList, and Option to dump() to dbgs() rather than errs().
Also add print() functions. Patch by Justin Lebar! llvm-svn: 256010
Diffstat (limited to 'llvm/lib/Option/ArgList.cpp')
-rw-r--r--llvm/lib/Option/ArgList.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Option/ArgList.cpp b/llvm/lib/Option/ArgList.cpp
index 48f1a71d986..0826ef87319 100644
--- a/llvm/lib/Option/ArgList.cpp
+++ b/llvm/lib/Option/ArgList.cpp
@@ -13,6 +13,7 @@
#include "llvm/ADT/Twine.h"
#include "llvm/Option/Arg.h"
#include "llvm/Option/Option.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
@@ -328,13 +329,15 @@ const char *ArgList::GetOrMakeJoinedArgString(unsigned Index,
return MakeArgString(LHS + RHS);
}
-LLVM_DUMP_METHOD void ArgList::dump() const {
+void ArgList::print(raw_ostream &O) const {
for (Arg *A : *this) {
- llvm::errs() << "* ";
- A->dump();
+ O << "* ";
+ A->print(O);
}
}
+LLVM_DUMP_METHOD void ArgList::dump() const { print(dbgs()); }
+
//
void InputArgList::releaseMemory() {
OpenPOWER on IntegriCloud