[cfe-commits] r46794 - /cfe/trunk/Analysis/ValueState.h

Ted Kremenek kremenek at apple.com
Tue Feb 5 18:50:36 PST 2008


Author: kremenek
Date: Tue Feb  5 20:50:36 2008
New Revision: 46794

URL: http://llvm.org/viewvc/llvm-project?rev=46794&view=rev
Log:
Disabled operator= for ValueStateImpl.
ValueState no longer inherits FoldingSetNode (not needed).
Removed redundant operator= implementation for ValueState (it simply did the default behavior).

Modified:
    cfe/trunk/Analysis/ValueState.h

Modified: cfe/trunk/Analysis/ValueState.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Analysis/ValueState.h?rev=46794&r1=46793&r2=46794&view=diff

==============================================================================
--- cfe/trunk/Analysis/ValueState.h (original)
+++ cfe/trunk/Analysis/ValueState.h Tue Feb  5 20:50:36 2008
@@ -125,7 +125,11 @@
 ///  for a "state" in our symbolic value tracking.  It is intended to be
 ///  used as a functional object; that is once it is created and made
 ///  "persistent" in a FoldingSet its values will never change.
-struct ValueStateImpl : public llvm::FoldingSetNode {
+class ValueStateImpl : public llvm::FoldingSetNode {
+private:
+  void operator=(const ValueStateImpl& R) const;
+
+public:
   vstate::VariableBindingsTy VariableBindings;
   vstate::ConstantNotEqTy    ConstantNotEq;
   vstate::ConstantEqTy       ConstantEq;
@@ -144,6 +148,8 @@
       ConstantNotEq(RHS.ConstantNotEq),
       ConstantEq(RHS.ConstantEq) {} 
   
+
+  
   /// Profile - Profile the contents of a ValueStateImpl object for use
   ///  in a FoldingSet.
   static void Profile(llvm::FoldingSetNodeID& ID, const ValueStateImpl& V) {
@@ -167,12 +173,11 @@
 ///  void* when being handled by GREngine.  It also forces us to unique states;
 ///  consequently, a ValueStateImpl* with a specific address will always refer
 ///  to the unique state with those values.
-class ValueState : public llvm::FoldingSetNode {
+class ValueState {
   ValueStateImpl* Data;
 public:
   ValueState(ValueStateImpl* D) : Data(D) {}
-  ValueState() : Data(0) {}  
-  void operator=(ValueStateImpl* D) { Data = D; }
+  ValueState() : Data(0) {}
   
   // Accessors.  
   ValueStateImpl* getImpl() const { return Data; }





More information about the cfe-commits mailing list