move some code out of line, rearrange a bit.
authorChris Lattner <sabre@nondot.org>
Thu, 3 Jan 2008 00:10:22 +0000 (00:10 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 3 Jan 2008 00:10:22 +0000 (00:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45519 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ParameterAttributes.h
lib/VMCore/ParameterAttributes.cpp

index 080de469351f6a82328be851bf63b98c645c0c8a..05c3ebe939718d6982cd8efcd188346d0395143b 100644 (file)
@@ -122,14 +122,12 @@ class ParamAttrsList : public FoldingSetNode {
     // ParamAttrsList is uniqued, these should not be publicly available
     void operator=(const ParamAttrsList &); // Do not implement
     ParamAttrsList(const ParamAttrsList &); // Do not implement
-    ParamAttrsList();                       // Do not implement
     ~ParamAttrsList();                      // Private implementation
 
     /// Only the \p get method can invoke this when it wants to create a
     /// new instance.
     /// @brief Construct an ParamAttrsList from a ParamAttrsVector
-    explicit ParamAttrsList(const ParamAttrsVector &attrVec) 
-      : attrs(attrVec), refCount(0) {}
+    explicit ParamAttrsList(const ParamAttrsVector &attrVec);
 
   public:
     /// This method ensures the uniqueness of ParamAttrsList instances.  The
index 37a2819d86ed89223efc5fba72a5b78d005cf877..aaf80cd76581d098d2f6789b13c267a3ef4e9ea2 100644 (file)
 #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);
-}
-