From 556b21aa10ee7ffe8724cb0c5f5d5df9bc718ddc Mon Sep 17 00:00:00 2001 From: Yaron Keren Date: Thu, 13 Aug 2015 18:12:56 +0000 Subject: 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 --- clang/lib/CodeGen/CodeGenModule.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') 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) { -- cgit v1.1