Terminate file with newline.
authorReid Spencer <rspencer@reidspencer.com>
Sun, 22 Apr 2007 16:29:35 +0000 (16:29 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Sun, 22 Apr 2007 16:29:35 +0000 (16:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36343 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ParameterAttributes.h

index 4c4b0c75821bda006608920c93e0540ac13c132b..87311c8de8b8154b1be4a78fe0f732201287b2a0 100644 (file)
@@ -70,7 +70,7 @@ class ParamAttrsList : public FoldingSetNode {
     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 @@ class ParamAttrsList : public FoldingSetNode {
   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
   /// @}
 };