summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index
diff options
context:
space:
mode:
authorYaron Keren <yaron.keren@gmail.com>2015-08-13 18:12:56 +0000
committerYaron Keren <yaron.keren@gmail.com>2015-08-13 18:12:56 +0000
commit556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc (patch)
treec0a5083d290ea0d5138c674e1a5a8019816b76c9 /clang/lib/Index
parent1dbb95151b0ed90ba376a1da90a1bd1eb9364e12 (diff)
downloadbcm5719-llvm-556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc.tar.gz
bcm5719-llvm-556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc.zip
Remove and forbid raw_svector_ostream::flush() calls.
After r244870 flush() will only compare two null pointers and return, doing nothing but wasting run time. The call is not required any more as the stream and its SmallString are always in sync. Thanks to David Blaikie for reviewing. llvm-svn: 244928
Diffstat (limited to 'clang/lib/Index')
-rw-r--r--clang/lib/Index/CommentToXML.cpp3
-rw-r--r--clang/lib/Index/USRGeneration.cpp3
2 files changed, 0 insertions, 6 deletions
diff --git a/clang/lib/Index/CommentToXML.cpp b/clang/lib/Index/CommentToXML.cpp
index ef6aeefa652..d5c225ecad6 100644
--- a/clang/lib/Index/CommentToXML.cpp
+++ b/clang/lib/Index/CommentToXML.cpp
@@ -481,7 +481,6 @@ void CommentASTToHTMLConverter::visitFullComment(const FullComment *C) {
Result << "</div>";
}
- Result.flush();
}
void CommentASTToHTMLConverter::visitNonStandaloneParagraphComment(
@@ -1078,8 +1077,6 @@ void CommentASTToXMLConverter::visitFullComment(const FullComment *C) {
}
Result << RootEndTag;
-
- Result.flush();
}
void CommentASTToXMLConverter::appendToResultWithXMLEscaping(StringRef S) {
diff --git a/clang/lib/Index/USRGeneration.cpp b/clang/lib/Index/USRGeneration.cpp
index 8cdd283ba5c..cc98a719a62 100644
--- a/clang/lib/Index/USRGeneration.cpp
+++ b/clang/lib/Index/USRGeneration.cpp
@@ -156,10 +156,8 @@ public:
//===----------------------------------------------------------------------===//
bool USRGenerator::EmitDeclName(const NamedDecl *D) {
- Out.flush();
const unsigned startSize = Buf.size();
D->printName(Out);
- Out.flush();
const unsigned endSize = Buf.size();
return startSize == endSize;
}
@@ -462,7 +460,6 @@ void USRGenerator::VisitTagDecl(const TagDecl *D) {
}
Out << '@';
- Out.flush();
assert(Buf.size() > 0);
const unsigned off = Buf.size() - 1;
OpenPOWER on IntegriCloud