From a64c6dbb9813b39174023c6ee123c3bf936f7fe5 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Thu, 6 Dec 2012 18:58:12 +0000 Subject: [PATCH] [analyzer] Speed up ExplodedNode::Profile by avoiding copy constructors. ProgramStateRef::Retain isn't free! llvm-svn: 169525 --- .../clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h index defac21fa369..971a28038409 100644 --- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h +++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h @@ -174,7 +174,8 @@ public: } void Profile(llvm::FoldingSetNodeID& ID) const { - Profile(ID, getLocation(), getState(), isSink()); + // We avoid copy constructors by not using accessors. + Profile(ID, Location, State, isSink()); } /// addPredeccessor - Adds a predecessor to the current node, and