llvm.org GIT mirror llvm / a4f8ecd
Micro-optimize these functions in the case where they are not inlined. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91316 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 10 years ago
2 changed file(s) with 5 addition(s) and 10 deletion(s). Raw diff Collapse all Expand all
185185 // Inline fast path, particulary for constant strings where a sufficiently
186186 // smart compiler will simplify strlen.
187187
188 this->operator<<(StringRef(Str));
189 return *this;
188 return this->operator<<(StringRef(Str));
190189 }
191190
192191 raw_ostream &operator<<(const std::string &Str) {
193192 // Avoid the fast path, it would only increase code size for a marginal win.
194 write(Str.data(), Str.length());
195 return *this;
193 return write(Str.data(), Str.length());
196194 }
197195
198196 raw_ostream &operator<<(unsigned long N);
201199 raw_ostream &operator<<(long long N);
202200 raw_ostream &operator<<(const void *P);
203201 raw_ostream &operator<<(unsigned int N) {
204 this->operator<<(static_cast(N));
205 return *this;
202 return this->operator<<(static_cast(N));
206203 }
207204
208205 raw_ostream &operator<<(int N) {
209 this->operator<<(static_cast(N));
210 return *this;
206 return this->operator<<(static_cast(N));
211207 }
212208
213209 raw_ostream &operator<<(double N);
208208 }
209209
210210 raw_ostream &raw_ostream::operator<<(double N) {
211 this->operator<<(ftostr(N));
212 return *this;
211 return this->operator<<(ftostr(N));
213212 }
214213
215214