]> granicus.if.org Git - clang/commitdiff
[analyzer] Speed up ExplodedNode::Profile by avoiding copy constructors.
authorJordan Rose <jordan_rose@apple.com>
Thu, 6 Dec 2012 18:58:12 +0000 (18:58 +0000)
committerJordan Rose <jordan_rose@apple.com>
Thu, 6 Dec 2012 18:58:12 +0000 (18:58 +0000)
ProgramStateRef::Retain isn't free!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169525 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h

index defac21fa369f72ff6f62b79aa128e019797de01..971a280384096ae0c01001cc716471f15982e1ab 100644 (file)
@@ -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