aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
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/CodeGen/CodeGenModule.cpp
parent1dbb95151b0ed90ba376a1da90a1bd1eb9364e12 (diff)
downloadllvm-556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc.zip
llvm-556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc.tar.gz
llvm-556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc.tar.bz2
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/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index fe1f9ba..5ce25a2 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -2953,7 +2953,6 @@ CodeGenModule::GetAddrOfConstantStringFromLiteral(const StringLiteral *S,
getCXXABI().getMangleContext().shouldMangleStringLiteral(S)) {
llvm::raw_svector_ostream Out(MangledNameBuffer);
getCXXABI().getMangleContext().mangleStringLiteral(S, Out);
- Out.flush();
LT = llvm::GlobalValue::LinkOnceODRLinkage;
GlobalVariableName = MangledNameBuffer;
@@ -3041,7 +3040,6 @@ llvm::Constant *CodeGenModule::GetAddrOfGlobalTemporary(
llvm::raw_svector_ostream Out(Name);
getCXXABI().getMangleContext().mangleReferenceTemporary(
VD, E->getManglingNumber(), Out);
- Out.flush();
APValue *Value = nullptr;
if (E->getStorageDuration() == SD_Static) {