diff options
author | dim <dim@FreeBSD.org> | 2015-12-30 13:13:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-12-30 13:13:10 +0000 |
commit | 9b5bf5c4f53d65d6a48722d7410ed7cb15f5ba3a (patch) | |
tree | b466a4817f79516eb1df8eae92bccf62ecc84003 /contrib/llvm/lib/Option/Arg.cpp | |
parent | f09a28d1de99fda4f5517fb12670fc36552f4927 (diff) | |
parent | e194cd6d03d91631334d9d5e55b506036f423cc8 (diff) | |
download | FreeBSD-src-9b5bf5c4f53d65d6a48722d7410ed7cb15f5ba3a.zip FreeBSD-src-9b5bf5c4f53d65d6a48722d7410ed7cb15f5ba3a.tar.gz |
Update llvm to trunk r256633.
Diffstat (limited to 'contrib/llvm/lib/Option/Arg.cpp')
-rw-r--r-- | contrib/llvm/lib/Option/Arg.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/contrib/llvm/lib/Option/Arg.cpp b/contrib/llvm/lib/Option/Arg.cpp index ac00073..c3de2d1 100644 --- a/contrib/llvm/lib/Option/Arg.cpp +++ b/contrib/llvm/lib/Option/Arg.cpp @@ -13,6 +13,7 @@ #include "llvm/Option/ArgList.h" #include "llvm/Option/Option.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Support/Debug.h" using namespace llvm; using namespace llvm::opt; @@ -43,23 +44,25 @@ Arg::~Arg() { } } -void Arg::dump() const { - llvm::errs() << "<"; +void Arg::print(raw_ostream& O) const { + O << "<"; - llvm::errs() << " Opt:"; - Opt.dump(); + O << " Opt:"; + Opt.print(O); - llvm::errs() << " Index:" << Index; + O << " Index:" << Index; - llvm::errs() << " Values: ["; + O << " Values: ["; for (unsigned i = 0, e = Values.size(); i != e; ++i) { - if (i) llvm::errs() << ", "; - llvm::errs() << "'" << Values[i] << "'"; + if (i) O << ", "; + O << "'" << Values[i] << "'"; } - llvm::errs() << "]>\n"; + O << "]>\n"; } +LLVM_DUMP_METHOD void Arg::dump() const { print(dbgs()); } + std::string Arg::getAsString(const ArgList &Args) const { SmallString<256> Res; llvm::raw_svector_ostream OS(Res); |