[llvm-commits] [llvm] r45519 - in /llvm/trunk: include/llvm/ParameterAttributes.h lib/VMCore/ParameterAttributes.cpp
Chris Lattner
sabre at nondot.org
Wed Jan 2 16:10:22 PST 2008
Author: lattner
Date: Wed Jan 2 18:10:22 2008
New Revision: 45519
URL: http://llvm.org/viewvc/llvm-project?rev=45519&view=rev
Log:
move some code out of line, rearrange a bit.
Modified:
llvm/trunk/include/llvm/ParameterAttributes.h
llvm/trunk/lib/VMCore/ParameterAttributes.cpp
Modified: llvm/trunk/include/llvm/ParameterAttributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ParameterAttributes.h?rev=45519&r1=45518&r2=45519&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ParameterAttributes.h (original)
+++ llvm/trunk/include/llvm/ParameterAttributes.h Wed Jan 2 18:10:22 2008
@@ -122,14 +122,12 @@
// 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
Modified: llvm/trunk/lib/VMCore/ParameterAttributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ParameterAttributes.cpp?rev=45519&r1=45518&r2=45519&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/ParameterAttributes.cpp (original)
+++ llvm/trunk/lib/VMCore/ParameterAttributes.cpp Wed Jan 2 18:10:22 2008
@@ -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 @@
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 @@
return getModified(PAL, modVec);
}
-ParamAttrsList::~ParamAttrsList() {
- ParamAttrsLists->RemoveNode(this);
-}
-
More information about the llvm-commits
mailing list