From: David Blaikie Date: Fri, 5 Sep 2014 00:14:57 +0000 (+0000) Subject: unique_ptrify AnalysisConsumer.cpp::CreateUbiViz X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d18cdb595671f0d9ecee4ee8e8c0f9b0dd3c4ced;p=clang unique_ptrify AnalysisConsumer.cpp::CreateUbiViz git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217212 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp b/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp index 3ebab0930a..ca047a966b 100644 --- a/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp +++ b/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp @@ -54,7 +54,7 @@ using llvm::SmallPtrSet; #define DEBUG_TYPE "AnalysisConsumer" -static ExplodedNode::Auditor* CreateUbiViz(); +static std::unique_ptr CreateUbiViz(); STATISTIC(NumFunctionTopLevel, "The # of functions at top level."); STATISTIC(NumFunctionsAnalyzed, @@ -649,7 +649,7 @@ void AnalysisConsumer::ActionExprEngine(Decl *D, bool ObjCGCEnabled, // Set the graph auditor. std::unique_ptr Auditor; if (Mgr->options.visualizeExplodedGraphWithUbiGraph) { - Auditor.reset(CreateUbiViz()); + Auditor = CreateUbiViz(); ExplodedNode::SetAuditor(Auditor.get()); } @@ -731,7 +731,7 @@ public: } // end anonymous namespace -static ExplodedNode::Auditor* CreateUbiViz() { +static std::unique_ptr CreateUbiViz() { SmallString<128> P; int FD; llvm::sys::fs::createTemporaryFile("llvm_ubi", "", FD, P); @@ -739,7 +739,7 @@ static ExplodedNode::Auditor* CreateUbiViz() { auto Stream = llvm::make_unique(FD, true); - return new UbigraphViz(std::move(Stream), P); + return llvm::make_unique(std::move(Stream), P); } void UbigraphViz::AddEdge(ExplodedNode *Src, ExplodedNode *Dst) {