aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/ParameterAttributes.h
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-22 16:29:35 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-22 16:29:35 +0000
commit0146c2e67bd3d00235d3cd5c686e8b773a2da7a8 (patch)
treeac53d253960063d3b34f74b5f036acbac6dcddfa /include/llvm/ParameterAttributes.h
parent728e0e3173fec721ddde92e55f775043857cb6cf (diff)
downloadexternal_llvm-0146c2e67bd3d00235d3cd5c686e8b773a2da7a8.zip
external_llvm-0146c2e67bd3d00235d3cd5c686e8b773a2da7a8.tar.gz
external_llvm-0146c2e67bd3d00235d3cd5c686e8b773a2da7a8.tar.bz2
Terminate file with newline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36343 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/ParameterAttributes.h')
-rw-r--r--include/llvm/ParameterAttributes.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/ParameterAttributes.h b/include/llvm/ParameterAttributes.h
index 4c4b0c7..87311c8 100644
--- a/include/llvm/ParameterAttributes.h
+++ b/include/llvm/ParameterAttributes.h
@@ -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
/// @}
};