mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
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
This commit is contained in:
parent
49269d9e7e
commit
fabfde3ff0
@ -122,14 +122,12 @@ class ParamAttrsList : public FoldingSetNode {
|
|||||||
// ParamAttrsList is uniqued, these should not be publicly available
|
// ParamAttrsList is uniqued, these should not be publicly available
|
||||||
void operator=(const ParamAttrsList &); // Do not implement
|
void operator=(const ParamAttrsList &); // Do not implement
|
||||||
ParamAttrsList(const ParamAttrsList &); // Do not implement
|
ParamAttrsList(const ParamAttrsList &); // Do not implement
|
||||||
ParamAttrsList(); // Do not implement
|
|
||||||
~ParamAttrsList(); // Private implementation
|
~ParamAttrsList(); // Private implementation
|
||||||
|
|
||||||
/// Only the \p get method can invoke this when it wants to create a
|
/// Only the \p get method can invoke this when it wants to create a
|
||||||
/// new instance.
|
/// new instance.
|
||||||
/// @brief Construct an ParamAttrsList from a ParamAttrsVector
|
/// @brief Construct an ParamAttrsList from a ParamAttrsVector
|
||||||
explicit ParamAttrsList(const ParamAttrsVector &attrVec)
|
explicit ParamAttrsList(const ParamAttrsVector &attrVec);
|
||||||
: attrs(attrVec), refCount(0) {}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/// This method ensures the uniqueness of ParamAttrsList instances. The
|
/// This method ensures the uniqueness of ParamAttrsList instances. The
|
||||||
|
@ -15,6 +15,16 @@
|
|||||||
#include "llvm/Support/ManagedStatic.h"
|
#include "llvm/Support/ManagedStatic.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
static ManagedStatic<FoldingSet<ParamAttrsList> > ParamAttrsLists;
|
||||||
|
|
||||||
|
ParamAttrsList::ParamAttrsList(const ParamAttrsVector &attrVec)
|
||||||
|
: attrs(attrVec), refCount(0) {
|
||||||
|
}
|
||||||
|
|
||||||
|
ParamAttrsList::~ParamAttrsList() {
|
||||||
|
ParamAttrsLists->RemoveNode(this);
|
||||||
|
}
|
||||||
|
|
||||||
uint16_t
|
uint16_t
|
||||||
ParamAttrsList::getParamAttrs(uint16_t Index) const {
|
ParamAttrsList::getParamAttrs(uint16_t Index) const {
|
||||||
unsigned limit = attrs.size();
|
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));
|
ID.AddInteger(unsigned(attrs[i].attrs) << 16 | unsigned(attrs[i].index));
|
||||||
}
|
}
|
||||||
|
|
||||||
static ManagedStatic<FoldingSet<ParamAttrsList> > ParamAttrsLists;
|
|
||||||
|
|
||||||
const ParamAttrsList *
|
const ParamAttrsList *
|
||||||
ParamAttrsList::get(const ParamAttrsVector &attrVec) {
|
ParamAttrsList::get(const ParamAttrsVector &attrVec) {
|
||||||
// If there are no attributes then return a null ParamAttrsList pointer.
|
// If there are no attributes then return a null ParamAttrsList pointer.
|
||||||
@ -220,7 +228,3 @@ ParamAttrsList::excludeAttrs(const ParamAttrsList *PAL,
|
|||||||
return getModified(PAL, modVec);
|
return getModified(PAL, modVec);
|
||||||
}
|
}
|
||||||
|
|
||||||
ParamAttrsList::~ParamAttrsList() {
|
|
||||||
ParamAttrsLists->RemoveNode(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user