[llvm-commits] CVS: llvm/include/llvm/ParameterAttributes.h

Reid Spencer reid at x10sys.com
Sun Apr 22 09:29:53 PDT 2007



Changes in directory llvm/include/llvm:

ParameterAttributes.h updated: 1.8 -> 1.9
---
Log message:

Terminate file with newline.


---
Diffs of the changes:  (+4 -1)

 ParameterAttributes.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/include/llvm/ParameterAttributes.h
diff -u llvm/include/llvm/ParameterAttributes.h:1.8 llvm/include/llvm/ParameterAttributes.h:1.9
--- llvm/include/llvm/ParameterAttributes.h:1.8	Sun Apr 22 00:46:44 2007
+++ llvm/include/llvm/ParameterAttributes.h	Sun Apr 22 11:29:35 2007
@@ -70,7 +70,7 @@
     void operator=(const ParamAttrsList &); // Do not implement
     ParamAttrsList(const ParamAttrsList &); // Do not implement
     ParamAttrsList();                       // Do not implement
-    ~ParamAttrsList() {}                    // Not public!
+    ~ParamAttrsList();
 
     /// @brief Construct an ParamAttrsList from a ParamAttrsVector
     explicit ParamAttrsList(const ParamAttrsVector &attrVec) : attrs(attrVec) {}
@@ -162,12 +162,15 @@
   public:
     void Profile(FoldingSetNodeID &ID) const;
     void dump() const;
+    void addRef() const { refCount++; }
+    void dropRef() const { if (--refCount == 0) delete this; }
 
   /// @}
   /// @name Data
   /// @{
   private:
     ParamAttrsVector attrs; ///< The list of attributes
+    mutable unsigned refCount;      ///< The number of references to this object
   /// @}
 };
 






More information about the llvm-commits mailing list