// 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
#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();
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.
return getModified(PAL, modVec);
}
-ParamAttrsList::~ParamAttrsList() {
- ParamAttrsLists->RemoveNode(this);
-}
-