aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/ParameterAttributes.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-01-03 00:10:22 +0000
committerChris Lattner <sabre@nondot.org>2008-01-03 00:10:22 +0000
commitfabfde3ff08570a2f903068061e472d51b06e7fc (patch)
tree818a6bce4ddcee8268741055326c4655066905df /lib/VMCore/ParameterAttributes.cpp
parent49269d9e7eb5ce6e1a84a10ca0bdeab044d0db3d (diff)
move some code out of line, rearrange a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45519 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ParameterAttributes.cpp')
-rw-r--r--lib/VMCore/ParameterAttributes.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/lib/VMCore/ParameterAttributes.cpp b/lib/VMCore/ParameterAttributes.cpp
index 37a2819d86..aaf80cd765 100644
--- a/lib/VMCore/ParameterAttributes.cpp
+++ b/lib/VMCore/ParameterAttributes.cpp
@@ -15,6 +15,16 @@
#include "llvm/Support/ManagedStatic.h"
using namespace llvm;
+static ManagedStatic<FoldingSet<ParamAttrsList> > ParamAttrsLists;
+
+ParamAttrsList::ParamAttrsList(const ParamAttrsVector &attrVec)
+ : attrs(attrVec), refCount(0) {
+}
+
+ParamAttrsList::~ParamAttrsList() {
+ ParamAttrsLists->RemoveNode(this);
+}
+
uint16_t
ParamAttrsList::getParamAttrs(uint16_t Index) const {
unsigned limit = attrs.size();
@@ -101,8 +111,6 @@ void ParamAttrsList::Profile(FoldingSetNodeID &ID) const {
ID.AddInteger(unsigned(attrs[i].attrs) << 16 | unsigned(attrs[i].index));
}
-static ManagedStatic<FoldingSet<ParamAttrsList> > ParamAttrsLists;
-
const ParamAttrsList *
ParamAttrsList::get(const ParamAttrsVector &attrVec) {
// If there are no attributes then return a null ParamAttrsList pointer.
@@ -220,7 +228,3 @@ ParamAttrsList::excludeAttrs(const ParamAttrsList *PAL,
return getModified(PAL, modVec);
}
-ParamAttrsList::~ParamAttrsList() {
- ParamAttrsLists->RemoveNode(this);
-}
-