prune the #includes in raw_ostream.h by moving a
authorChris Lattner <sabre@nondot.org>
Mon, 24 Aug 2009 03:52:50 +0000 (03:52 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 24 Aug 2009 03:52:50 +0000 (03:52 +0000)
member out of line. ftostr is not particularly speedy,
so that method is presumably not perf sensitive.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79885 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/raw_ostream.h
lib/CodeGen/AsmPrinter/DwarfDebug.cpp
lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
lib/MC/MCAssembler.cpp
lib/Support/raw_ostream.cpp
lib/Target/CppBackend/CPPBackend.cpp
lib/Transforms/IPO/ArgumentPromotion.cpp
tools/bugpoint/ToolRunner.cpp
utils/TableGen/InstrInfoEmitter.cpp

index c2252dcb04e3ca41707732ba62220eaeb7d40d98..0a5019edcd23fc8ff0e1ce779fa3cc2083c9ca9f 100644 (file)
 #ifndef LLVM_SUPPORT_RAW_OSTREAM_H
 #define LLVM_SUPPORT_RAW_OSTREAM_H
 
-#include "llvm/ADT/StringExtras.h"
 #include "llvm/ADT/StringRef.h"
-#include <cassert>
-#include <cstring>
-#include <string>
 #include <iosfwd>
 
 namespace llvm {
@@ -215,11 +211,7 @@ public:
     return *this;
   }
 
-  raw_ostream &operator<<(double N) {
-    this->operator<<(ftostr(N));
-    return *this;
-  }
-  
+  raw_ostream &operator<<(double N);  
 
   /// write_hex - Output \arg N in hexadecimal, without any prefix or padding.
   raw_ostream &write_hex(unsigned long long N);
index ab86998750116da0ffd7af4f16de0aac92de20ac..fbb522df1496498ef1e249aaa0f942a362488800 100644 (file)
@@ -22,6 +22,7 @@
 #include "llvm/Target/TargetFrameInfo.h"
 #include "llvm/Target/TargetLoweringObjectFile.h"
 #include "llvm/Target/TargetRegisterInfo.h"
+#include "llvm/ADT/StringExtras.h"
 #include "llvm/Support/Timer.h"
 #include "llvm/System/Path.h"
 using namespace llvm;
index 857f9954883e46a8bbd777af11a1f34ff094c6bc..20b959b914fcce2897e5130351e530b42cdce922 100644 (file)
 #include "llvm/CodeGen/MachineFrameInfo.h"
 #include "llvm/CodeGen/MachineFunction.h"
 #include "llvm/CodeGen/MachineModuleInfo.h"
-#include "llvm/Support/Dwarf.h"
-#include "llvm/Support/ErrorHandling.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Target/TargetFrameInfo.h"
 #include "llvm/Target/TargetRegisterInfo.h"
-
+#include "llvm/Support/Dwarf.h"
+#include "llvm/Support/ErrorHandling.h"
+#include "llvm/ADT/StringExtras.h"
 using namespace llvm;
 
 Dwarf::Dwarf(raw_ostream &OS, AsmPrinter *A, const MCAsmInfo *T,
index 99d2988dc8ec94e71ff903d8bf43b01053f5ed2e..7a67fac7efd9f4a96c9d1110a7949142d7b9ec4f 100644 (file)
@@ -16,6 +16,7 @@
 #include "llvm/ADT/Twine.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
+#include <vector>
 using namespace llvm;
 
 class MachObjectWriter;
index 221859d5337999380c46e502259f6949f0a35642..4dd891d64f88dd4576d36dcec7311177be71c946 100644 (file)
@@ -19,6 +19,7 @@
 #include "llvm/Config/config.h"
 #include "llvm/Support/Compiler.h"
 #include "llvm/Support/ErrorHandling.h"
+#include "llvm/ADT/StringExtras.h"
 #include <ostream>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -173,6 +174,13 @@ raw_ostream &raw_ostream::operator<<(const void *P) {
   return write_hex((uintptr_t) P);
 }
 
+raw_ostream &raw_ostream::operator<<(double N) {
+  this->operator<<(ftostr(N));
+  return *this;
+}
+
+
+
 void raw_ostream::flush_nonempty() {
   assert(OutBufCur > OutBufStart && "Invalid call to flush_nonempty.");
   size_t Length = OutBufCur - OutBufStart;
index 3de81a47c74448e2268b8fb68f2ede30e9c0d049..bebad667967ba7adeb23fc5e5767676495fed5a9 100644 (file)
@@ -28,6 +28,7 @@
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/FormattedStream.h"
 #include "llvm/Target/TargetRegistry.h"
+#include "llvm/ADT/StringExtras.h"
 #include "llvm/Config/config.h"
 #include <algorithm>
 #include <set>
index 895a87b6cadffb3b5b7454df08b370476ed529e8..75843e84d2aed2cee244d6c69738f392eaaad621 100644 (file)
@@ -47,6 +47,7 @@
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/ADT/DepthFirstIterator.h"
 #include "llvm/ADT/Statistic.h"
+#include "llvm/ADT/StringExtras.h"
 #include <set>
 using namespace llvm;
 
index e3e1cae4e5d0575b946b945ae32a93150f58db3d..f6fc37eb1fff885a62ea081daee50bed9c7adb33 100644 (file)
@@ -18,6 +18,7 @@
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/FileUtilities.h"
 #include "llvm/Support/raw_ostream.h"
+#include "llvm/ADT/StringExtras.h"
 #include "llvm/Config/config.h"   // for HAVE_LINK_R
 #include <fstream>
 #include <sstream>
index ef52c07692a2843188e8b0017824e36823139670..533ff9f98f324dd09137ea7803e3eb6de310c765 100644 (file)
@@ -15,6 +15,7 @@
 #include "InstrInfoEmitter.h"
 #include "CodeGenTarget.h"
 #include "Record.h"
+#include "llvm/ADT/StringExtras.h"
 #include <algorithm>
 using namespace llvm;