From 5862853db7ee22e6244f1736963c98fba47bd0dc Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Fri, 18 Dec 2015 02:30:45 +0000 Subject: [PATCH] Revert "[Option] Introduce Arg::print(raw_ostream&) and use llvm::dbgs" This reverts commit r255977. This is part of http://reviews.llvm.org/D15634. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255978 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Option/Arg.h | 3 --- lib/Option/Arg.cpp | 21 +++++++++------------ 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/include/llvm/Option/Arg.h b/include/llvm/Option/Arg.h index f56ef080dcf..e1b72b6267c 100644 --- a/include/llvm/Option/Arg.h +++ b/include/llvm/Option/Arg.h @@ -18,7 +18,6 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/Option/Option.h" -#include "llvm/Support/raw_ostream.h" #include namespace llvm { @@ -114,8 +113,6 @@ public: /// when rendered as a input (e.g., Xlinker). void renderAsInput(const ArgList &Args, ArgStringList &Output) const; - void print(raw_ostream &OS) const; - void dump() const; /// \brief Return a formatted version of the argument and diff --git a/lib/Option/Arg.cpp b/lib/Option/Arg.cpp index b14493d7dd7..ac000736c1f 100644 --- a/lib/Option/Arg.cpp +++ b/lib/Option/Arg.cpp @@ -12,7 +12,7 @@ #include "llvm/ADT/Twine.h" #include "llvm/Option/ArgList.h" #include "llvm/Option/Option.h" -#include "llvm/Support/Debug.h" +#include "llvm/Support/raw_ostream.h" using namespace llvm; using namespace llvm::opt; @@ -43,24 +43,21 @@ Arg::~Arg() { } } -void Arg::print(raw_ostream &OS) const { - OS << "<"; +void Arg::dump() const { + llvm::errs() << "<"; - OS << " Opt:"; + llvm::errs() << " Opt:"; Opt.dump(); - OS << " Index:" << Index; + llvm::errs() << " Index:" << Index; - OS << " Values: ["; + llvm::errs() << " Values: ["; for (unsigned i = 0, e = Values.size(); i != e; ++i) { - OS << "'" << Values[i] << "'"; - if (i != e - 1) llvm::errs() << ", "; + if (i) llvm::errs() << ", "; + llvm::errs() << "'" << Values[i] << "'"; } - OS << "]>\n"; -} -void Arg::dump() const { - print(llvm::dbgs()); + llvm::errs() << "]>\n"; } std::string Arg::getAsString(const ArgList &Args) const { -- 2.34.1