[llvm] r255978 - Revert "[Option] Introduce Arg::print(raw_ostream&) and use llvm::dbgs"
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 8 16:20:44 PST 2016
My mistake, I'll remember to be more explicit.
In this case, I reverted because echristo + jlebar were working on a more comprehensive cleanup in the same area (r256010). Too many cooks.
> On Jan 8, 2016, at 3:42 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
> On Thu, Dec 17, 2015 at 6:30 PM, Vedant Kumar via llvm-commits <llvm-commits at lists.llvm.org> wrote:
> Author: vedantk
> Date: Thu Dec 17 20:30:45 2015
> New Revision: 255978
>
> URL: http://llvm.org/viewvc/llvm-project?rev=255978&view=rev
> Log:
> Revert "[Option] Introduce Arg::print(raw_ostream&) and use llvm::dbgs"
>
> This reverts commit r255977. This is part of
> http://reviews.llvm.org/D15634.
>
> It's helpful to mention why something is reverted in the commit message (include a link to a buildbot, etc as well) - so someone can see why & avoid making the same mistake, potentially.
>
>
> Modified:
> llvm/trunk/include/llvm/Option/Arg.h
> llvm/trunk/lib/Option/Arg.cpp
>
> Modified: llvm/trunk/include/llvm/Option/Arg.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Option/Arg.h?rev=255978&r1=255977&r2=255978&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Option/Arg.h (original)
> +++ llvm/trunk/include/llvm/Option/Arg.h Thu Dec 17 20:30:45 2015
> @@ -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 <string>
>
> 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
>
> Modified: llvm/trunk/lib/Option/Arg.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Option/Arg.cpp?rev=255978&r1=255977&r2=255978&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Option/Arg.cpp (original)
> +++ llvm/trunk/lib/Option/Arg.cpp Thu Dec 17 20:30:45 2015
> @@ -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 {
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list