r244928 - Remove and forbid raw_svector_ostream::flush() calls.
Yaron Keren via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 13 11:12:57 PDT 2015
Author: yrnkrn
Date: Thu Aug 13 13:12:56 2015
New Revision: 244928
URL: http://llvm.org/viewvc/llvm-project?rev=244928&view=rev
Log:
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.
Modified:
cfe/trunk/lib/ARCMigrate/ARCMT.cpp
cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
cfe/trunk/lib/AST/ASTDiagnostic.cpp
cfe/trunk/lib/AST/Expr.cpp
cfe/trunk/lib/AST/ItaniumMangle.cpp
cfe/trunk/lib/AST/Mangle.cpp
cfe/trunk/lib/AST/MicrosoftMangle.cpp
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
cfe/trunk/lib/CodeGen/CGVTT.cpp
cfe/trunk/lib/CodeGen/CGVTables.cpp
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp
cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
cfe/trunk/lib/Index/CommentToXML.cpp
cfe/trunk/lib/Index/USRGeneration.cpp
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/lib/Sema/SemaExceptionSpec.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
cfe/trunk/tools/libclang/CIndex.cpp
Modified: cfe/trunk/lib/ARCMigrate/ARCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ARCMT.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ARCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ARCMT.cpp Thu Aug 13 13:12:56 2015
@@ -600,7 +600,6 @@ bool MigrationProcess::applyTransform(Tr
SmallString<512> newText;
llvm::raw_svector_ostream vecOS(newText);
buf.write(vecOS);
- vecOS.flush();
std::unique_ptr<llvm::MemoryBuffer> memBuf(
llvm::MemoryBuffer::getMemBufferCopy(
StringRef(newText.data(), newText.size()), newFname));
Modified: cfe/trunk/lib/ARCMigrate/ObjCMT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/ARCMigrate/ObjCMT.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/ARCMigrate/ObjCMT.cpp (original)
+++ cfe/trunk/lib/ARCMigrate/ObjCMT.cpp Thu Aug 13 13:12:56 2015
@@ -1982,7 +1982,6 @@ void ObjCMigrateASTConsumer::HandleTrans
SmallString<512> newText;
llvm::raw_svector_ostream vecOS(newText);
buf.write(vecOS);
- vecOS.flush();
std::unique_ptr<llvm::MemoryBuffer> memBuf(
llvm::MemoryBuffer::getMemBufferCopy(
StringRef(newText.data(), newText.size()), file->getName()));
@@ -2215,7 +2214,6 @@ static std::string applyEditsToTemp(cons
SmallString<512> NewText;
llvm::raw_svector_ostream OS(NewText);
Buf->write(OS);
- OS.flush();
SmallString<64> TempPath;
int FD;
Modified: cfe/trunk/lib/AST/ASTDiagnostic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ASTDiagnostic.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ASTDiagnostic.cpp (original)
+++ cfe/trunk/lib/AST/ASTDiagnostic.cpp Thu Aug 13 13:12:56 2015
@@ -445,8 +445,6 @@ void clang::FormatASTNodeDiagnosticArgum
}
- OS.flush();
-
if (NeedQuotes) {
Output.insert(Output.begin()+OldEnd, '\'');
Output.push_back('\'');
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Thu Aug 13 13:12:56 2015
@@ -498,7 +498,6 @@ std::string PredefinedExpr::ComputeName(
else
MC->mangleName(ND, Out);
- Out.flush();
if (!Buffer.empty() && Buffer.front() == '\01')
return Buffer.substr(1);
return Buffer.str();
@@ -660,7 +659,6 @@ std::string PredefinedExpr::ComputeName(
Out << Proto;
- Out.flush();
return Name.str().str();
}
if (const CapturedDecl *CD = dyn_cast<CapturedDecl>(CurrentDecl)) {
@@ -692,7 +690,6 @@ std::string PredefinedExpr::ComputeName(
MD->getSelector().print(Out);
Out << ']';
- Out.flush();
return Name.str().str();
}
if (isa<TranslationUnitDecl>(CurrentDecl) && IT == PrettyFunction) {
Modified: cfe/trunk/lib/AST/ItaniumMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ItaniumMangle.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/AST/ItaniumMangle.cpp (original)
+++ cfe/trunk/lib/AST/ItaniumMangle.cpp Thu Aug 13 13:12:56 2015
@@ -2405,7 +2405,6 @@ void CXXNameMangler::mangleType(const Ob
StringRef name = I->getName();
QualOS << name.size() << name;
}
- QualOS.flush();
Out << 'U' << QualStr.size() << QualStr;
}
Modified: cfe/trunk/lib/AST/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Mangle.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Mangle.cpp (original)
+++ cfe/trunk/lib/AST/Mangle.cpp Thu Aug 13 13:12:56 2015
@@ -206,7 +206,6 @@ void MangleContext::mangleCtorBlock(cons
SmallString<64> Buffer;
llvm::raw_svector_ostream Out(Buffer);
mangleCXXCtor(CD, CT, Out);
- Out.flush();
mangleFunctionBlock(*this, Buffer, BD, ResStream);
}
@@ -216,7 +215,6 @@ void MangleContext::mangleDtorBlock(cons
SmallString<64> Buffer;
llvm::raw_svector_ostream Out(Buffer);
mangleCXXDtor(DD, DT, Out);
- Out.flush();
mangleFunctionBlock(*this, Buffer, BD, ResStream);
}
@@ -253,7 +251,6 @@ void MangleContext::mangleBlock(const De
}
}
}
- Stream.flush();
mangleFunctionBlock(*this, Buffer, BD, Out);
}
Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Thu Aug 13 13:12:56 2015
@@ -721,7 +721,6 @@ void MicrosoftCXXNameMangler::mangleUnqu
llvm::raw_svector_ostream Stream(TemplateMangling);
MicrosoftCXXNameMangler Extra(Context, Stream);
Extra.mangleTemplateInstantiationName(TD, *TemplateArgs);
- Stream.flush();
mangleSourceName(TemplateMangling);
return;
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Thu Aug 13 13:12:56 2015
@@ -613,7 +613,6 @@ static SmallString<256> getUniqueTagType
// a unique string for a type?
llvm::raw_svector_ostream Out(FullName);
CGM.getCXXABI().getMangleContext().mangleCXXRTTIName(QualType(Ty, 0), Out);
- Out.flush();
return FullName;
}
Modified: cfe/trunk/lib/CodeGen/CGVTT.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVTT.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVTT.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTT.cpp Thu Aug 13 13:12:56 2015
@@ -108,7 +108,6 @@ llvm::GlobalVariable *CodeGenVTables::Ge
llvm::raw_svector_ostream Out(OutName);
cast<ItaniumMangleContext>(CGM.getCXXABI().getMangleContext())
.mangleCXXVTT(RD, Out);
- Out.flush();
StringRef Name = OutName.str();
// This will also defer the definition of the VTT.
Modified: cfe/trunk/lib/CodeGen/CGVTables.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGVTables.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGVTables.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGVTables.cpp Thu Aug 13 13:12:56 2015
@@ -44,7 +44,6 @@ llvm::Constant *CodeGenModule::GetAddrOf
Thunk.This, Out);
else
getCXXABI().getMangleContext().mangleThunk(MD, Thunk, Out);
- Out.flush();
llvm::Type *Ty = getTypes().GetFunctionTypeForVTable(GD);
return GetOrCreateLLVMFunction(Name, Ty, GD, /*ForVTable=*/true,
@@ -644,7 +643,6 @@ CodeGenVTables::GenerateConstructionVTab
cast<ItaniumMangleContext>(CGM.getCXXABI().getMangleContext())
.mangleCXXCtorVTable(RD, Base.getBaseOffset().getQuantity(),
Base.getBase(), Out);
- Out.flush();
StringRef Name = OutName.str();
llvm::ArrayType *ArrayType =
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Thu Aug 13 13:12:56 2015
@@ -2953,7 +2953,6 @@ CodeGenModule::GetAddrOfConstantStringFr
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::GetAddrOf
llvm::raw_svector_ostream Out(Name);
getCXXABI().getMangleContext().mangleReferenceTemporary(
VD, E->getManglingNumber(), Out);
- Out.flush();
APValue *Value = nullptr;
if (E->getStorageDuration() == SD_Static) {
Modified: cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenTBAA.cpp Thu Aug 13 13:12:56 2015
@@ -155,7 +155,6 @@ CodeGenTBAA::getTBAAInfo(QualType QTy) {
SmallString<256> OutName;
llvm::raw_svector_ostream Out(OutName);
MContext.mangleTypeName(QualType(ETy, 0), Out);
- Out.flush();
return MetadataCache[Ty] = createTBAAScalarType(OutName, getChar());
}
@@ -271,7 +270,6 @@ CodeGenTBAA::getTBAAStructTypeInfo(QualT
// Don't use the mangler for C code.
llvm::raw_svector_ostream Out(OutName);
MContext.mangleTypeName(QualType(Ty, 0), Out);
- Out.flush();
} else {
OutName = RD->getName();
}
Modified: cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/ItaniumCXXABI.cpp Thu Aug 13 13:12:56 2015
@@ -1439,7 +1439,6 @@ llvm::GlobalVariable *ItaniumCXXABI::get
SmallString<256> Name;
llvm::raw_svector_ostream Out(Name);
getMangleContext().mangleCXXVTable(RD, Out);
- Out.flush();
ItaniumVTableContext &VTContext = CGM.getItaniumVTableContext();
llvm::ArrayType *ArrayType = llvm::ArrayType::get(
@@ -1814,7 +1813,6 @@ void ItaniumCXXABI::EmitGuardedInit(Code
{
llvm::raw_svector_ostream out(guardName);
getMangleContext().mangleStaticGuardVariable(&D, out);
- out.flush();
}
// Create the guard variable with a zero-initializer.
@@ -2038,7 +2036,6 @@ ItaniumCXXABI::getOrCreateThreadLocalWra
{
llvm::raw_svector_ostream Out(WrapperName);
getMangleContext().mangleItaniumThreadLocalWrapper(VD, Out);
- Out.flush();
}
if (llvm::Value *V = CGM.getModule().getNamedValue(WrapperName))
@@ -2094,7 +2091,6 @@ void ItaniumCXXABI::EmitThreadLocalInitF
{
llvm::raw_svector_ostream Out(InitFnName);
getMangleContext().mangleItaniumThreadLocalInit(VD, Out);
- Out.flush();
}
// If we have a definition for the variable, emit the initialization
@@ -2290,7 +2286,6 @@ llvm::GlobalVariable *ItaniumRTTIBuilder
SmallString<256> Name;
llvm::raw_svector_ostream Out(Name);
CGM.getCXXABI().getMangleContext().mangleCXXRTTIName(Ty, Out);
- Out.flush();
// We know that the mangled name of the type starts at index 4 of the
// mangled name of the typename, so we can just index into it in order to
@@ -2312,7 +2307,6 @@ ItaniumRTTIBuilder::GetAddrOfExternalRTT
SmallString<256> Name;
llvm::raw_svector_ostream Out(Name);
CGM.getCXXABI().getMangleContext().mangleCXXRTTI(Ty, Out);
- Out.flush();
// Look for an existing global.
llvm::GlobalVariable *GV = CGM.getModule().getNamedGlobal(Name);
@@ -2711,7 +2705,6 @@ llvm::Constant *ItaniumRTTIBuilder::Buil
SmallString<256> Name;
llvm::raw_svector_ostream Out(Name);
CGM.getCXXABI().getMangleContext().mangleCXXRTTI(Ty, Out);
- Out.flush();
llvm::GlobalVariable *OldGV = CGM.getModule().getNamedGlobal(Name);
if (OldGV && !OldGV->isDeclaration()) {
Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp (original)
+++ cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp Thu Aug 13 13:12:56 2015
@@ -257,7 +257,6 @@ public:
SmallString<256> OutName;
llvm::raw_svector_ostream Out(OutName);
getMangleContext().mangleCXXVirtualDisplacementMap(SrcRD, DstRD, Out);
- Out.flush();
StringRef MangledName = OutName.str();
if (auto *VDispMap = CGM.getModule().getNamedGlobal(MangledName))
@@ -1854,7 +1853,6 @@ llvm::Function *MicrosoftCXXABI::EmitVir
SmallString<256> ThunkName;
llvm::raw_svector_ostream Out(ThunkName);
getMangleContext().mangleVirtualMemPtrThunk(MD, Out);
- Out.flush();
// If the thunk has been generated previously, just return it.
if (llvm::GlobalValue *GV = CGM.getModule().getNamedValue(ThunkName))
@@ -1930,7 +1928,6 @@ MicrosoftCXXABI::getAddrOfVBTable(const
SmallString<256> OutName;
llvm::raw_svector_ostream Out(OutName);
getMangleContext().mangleCXXVBTable(RD, VBT.MangledPath, Out);
- Out.flush();
StringRef Name = OutName.str();
llvm::ArrayType *VBTableType =
@@ -2342,7 +2339,6 @@ void MicrosoftCXXABI::EmitGuardedInit(Co
Out);
else
getMangleContext().mangleStaticGuardVariable(&D, Out);
- Out.flush();
}
// Create the guard variable with a zero-initializer. Just absorb linkage,
@@ -3747,7 +3743,6 @@ MicrosoftCXXABI::getAddrOfCXXCtorClosure
SmallString<256> ThunkName;
llvm::raw_svector_ostream Out(ThunkName);
getMangleContext().mangleCXXCtor(CD, CT, Out);
- Out.flush();
// If the thunk has been generated previously, just return it.
if (llvm::GlobalValue *GV = CGM.getModule().getNamedValue(ThunkName))
Modified: cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp (original)
+++ cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp Thu Aug 13 13:12:56 2015
@@ -139,7 +139,6 @@ public:
clang::EmitBackendOutput(Diags, CodeGenOpts, TargetOpts, LangOpts,
Ctx.getTargetInfo().getDataLayoutString(),
M.get(), BackendAction::Backend_EmitLL, &OS);
- OS.flush();
llvm::dbgs() << Buffer;
});
Modified: cfe/trunk/lib/Index/CommentToXML.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/CommentToXML.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/Index/CommentToXML.cpp (original)
+++ cfe/trunk/lib/Index/CommentToXML.cpp Thu Aug 13 13:12:56 2015
@@ -481,7 +481,6 @@ void CommentASTToHTMLConverter::visitFul
Result << "</div>";
}
- Result.flush();
}
void CommentASTToHTMLConverter::visitNonStandaloneParagraphComment(
@@ -1078,8 +1077,6 @@ void CommentASTToXMLConverter::visitFull
}
Result << RootEndTag;
-
- Result.flush();
}
void CommentASTToXMLConverter::appendToResultWithXMLEscaping(StringRef S) {
Modified: cfe/trunk/lib/Index/USRGeneration.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Index/USRGeneration.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/Index/USRGeneration.cpp (original)
+++ cfe/trunk/lib/Index/USRGeneration.cpp Thu Aug 13 13:12:56 2015
@@ -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 Ta
}
Out << '@';
- Out.flush();
assert(Buf.size() > 0);
const unsigned off = Buf.size() - 1;
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Thu Aug 13 13:12:56 2015
@@ -11461,7 +11461,6 @@ static FixItHint createFriendTagNNSFixIt
std::reverse(Namespaces.begin(), Namespaces.end());
for (auto *II : Namespaces)
OS << II->getName() << "::";
- OS.flush();
return FixItHint::CreateInsertion(NameLoc, Insertion);
}
Modified: cfe/trunk/lib/Sema/SemaExceptionSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExceptionSpec.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExceptionSpec.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExceptionSpec.cpp Thu Aug 13 13:12:56 2015
@@ -318,7 +318,6 @@ bool Sema::CheckEquivalentExceptionSpec(
default:
llvm_unreachable("This spec type is compatible with none.");
}
- OS.flush();
SourceLocation FixItLoc;
if (TypeSourceInfo *TSInfo = New->getTypeSourceInfo()) {
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp Thu Aug 13 13:12:56 2015
@@ -159,7 +159,6 @@ void DereferenceChecker::reportBug(Progr
break;
}
- os.flush();
auto report = llvm::make_unique<BugReport>(
*BT_null, buf.empty() ? BT_null->getDescription() : StringRef(buf), N);
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp Thu Aug 13 13:12:56 2015
@@ -276,7 +276,6 @@ void ASTFieldVisitor::ReportError(QualTy
}
}
os << " (type " << FieldChain.back()->getType().getAsString() << ")";
- os.flush();
// Note that this will fire for every translation unit that uses this
// class. This is suboptimal, but at least scan-build will merge
Modified: cfe/trunk/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndex.cpp?rev=244928&r1=244927&r2=244928&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndex.cpp (original)
+++ cfe/trunk/tools/libclang/CIndex.cpp Thu Aug 13 13:12:56 2015
@@ -7364,8 +7364,6 @@ Logger &cxindex::Logger::operator<<(cons
static llvm::ManagedStatic<llvm::sys::Mutex> LoggingMutex;
cxindex::Logger::~Logger() {
- LogOS.flush();
-
llvm::sys::ScopedLock L(*LoggingMutex);
static llvm::TimeRecord sBeginTR = llvm::TimeRecord::getCurrentTime();
More information about the cfe-commits
mailing list