Revert "[Option] Introduce Arg::print(raw_ostream&) and use llvm::dbgs"
authorVedant Kumar <vsk@apple.com>
Fri, 18 Dec 2015 02:30:45 +0000 (02:30 +0000)
committerVedant Kumar <vsk@apple.com>
Fri, 18 Dec 2015 02:30:45 +0000 (02:30 +0000)
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
lib/Option/Arg.cpp

index f56ef080dcfb9ec831cdde25a7d48ceeb407a353..e1b72b6267cf195d2f12d78b3774ab3fad4ffa0b 100644 (file)
@@ -18,7 +18,6 @@
 #include "llvm/ADT/SmallVector.h"
 #include "llvm/ADT/StringRef.h"
 #include "llvm/Option/Option.h"
 #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 {
 #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;
 
   /// 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
   void dump() const;
 
   /// \brief Return a formatted version of the argument and
index b14493d7dd79feab02ef184a42ab0f5ab3a31b2b..ac000736c1f3aac9bf21b76ec83745b89c83dd81 100644 (file)
@@ -12,7 +12,7 @@
 #include "llvm/ADT/Twine.h"
 #include "llvm/Option/ArgList.h"
 #include "llvm/Option/Option.h"
 #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;
 
 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();
 
   Opt.dump();
 
-  OS << " Index:" << Index;
+  llvm::errs() << " Index:" << Index;
 
 
-  OS << " Values: [";
+  llvm::errs() << " Values: [";
   for (unsigned i = 0, e = Values.size(); i != e; ++i) {
   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 {
 }
 
 std::string Arg::getAsString(const ArgList &Args) const {