blob: fb1a9b8cd5fbdf28aeceb7241bd417669428c146 [file] [log] [blame]
Devang Patel4c758ea2008-09-25 21:00:45 +00001//===-- Attributes.cpp - Implement AttributesList -------------------------===//
Chris Lattner3e13b8c2008-01-02 23:42:30 +00002//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
Devang Patel4c758ea2008-09-25 21:00:45 +000010// This file implements the AttributesList class and Attribute utilities.
Chris Lattner3e13b8c2008-01-02 23:42:30 +000011//
12//===----------------------------------------------------------------------===//
13
Devang Patelba3fa6c2008-09-23 23:03:40 +000014#include "llvm/Attributes.h"
Chris Lattner8a923e72008-03-12 17:45:29 +000015#include "llvm/Type.h"
Dan Gohmanfc429612008-03-10 23:55:07 +000016#include "llvm/ADT/StringExtras.h"
Chris Lattner8a923e72008-03-12 17:45:29 +000017#include "llvm/ADT/FoldingSet.h"
Owen Andersonc1a3a472009-08-20 19:03:20 +000018#include "llvm/System/Atomic.h"
Owen Andersond91e6b02009-08-17 17:10:58 +000019#include "llvm/System/Mutex.h"
Chris Lattner8a923e72008-03-12 17:45:29 +000020#include "llvm/Support/Streams.h"
Chris Lattner3e13b8c2008-01-02 23:42:30 +000021#include "llvm/Support/ManagedStatic.h"
22using namespace llvm;
23
Chris Lattner8a923e72008-03-12 17:45:29 +000024//===----------------------------------------------------------------------===//
Devang Patel4c758ea2008-09-25 21:00:45 +000025// Attribute Function Definitions
Chris Lattner8a923e72008-03-12 17:45:29 +000026//===----------------------------------------------------------------------===//
Chris Lattnerd0e1f102008-01-03 00:10:22 +000027
Devang Patel4c758ea2008-09-25 21:00:45 +000028std::string Attribute::getAsString(Attributes Attrs) {
Chris Lattner3e13b8c2008-01-02 23:42:30 +000029 std::string Result;
Devang Patel4c758ea2008-09-25 21:00:45 +000030 if (Attrs & Attribute::ZExt)
Chris Lattner3e13b8c2008-01-02 23:42:30 +000031 Result += "zeroext ";
Devang Patel4c758ea2008-09-25 21:00:45 +000032 if (Attrs & Attribute::SExt)
Chris Lattner3e13b8c2008-01-02 23:42:30 +000033 Result += "signext ";
Devang Patel4c758ea2008-09-25 21:00:45 +000034 if (Attrs & Attribute::NoReturn)
Chris Lattner3e13b8c2008-01-02 23:42:30 +000035 Result += "noreturn ";
Devang Patel4c758ea2008-09-25 21:00:45 +000036 if (Attrs & Attribute::NoUnwind)
Chris Lattner3e13b8c2008-01-02 23:42:30 +000037 Result += "nounwind ";
Devang Patel4c758ea2008-09-25 21:00:45 +000038 if (Attrs & Attribute::InReg)
Chris Lattner3e13b8c2008-01-02 23:42:30 +000039 Result += "inreg ";
Devang Patel4c758ea2008-09-25 21:00:45 +000040 if (Attrs & Attribute::NoAlias)
Chris Lattner3e13b8c2008-01-02 23:42:30 +000041 Result += "noalias ";
Nick Lewycky8d69f482008-12-19 09:38:31 +000042 if (Attrs & Attribute::NoCapture)
43 Result += "nocapture ";
Devang Patel4c758ea2008-09-25 21:00:45 +000044 if (Attrs & Attribute::StructRet)
Anton Korobeynikovc8ce7b082009-07-17 18:07:26 +000045 Result += "sret ";
Devang Patel4c758ea2008-09-25 21:00:45 +000046 if (Attrs & Attribute::ByVal)
Chris Lattner3e13b8c2008-01-02 23:42:30 +000047 Result += "byval ";
Devang Patel4c758ea2008-09-25 21:00:45 +000048 if (Attrs & Attribute::Nest)
Chris Lattner3e13b8c2008-01-02 23:42:30 +000049 Result += "nest ";
Devang Patel4c758ea2008-09-25 21:00:45 +000050 if (Attrs & Attribute::ReadNone)
Chris Lattner3e13b8c2008-01-02 23:42:30 +000051 Result += "readnone ";
Devang Patel4c758ea2008-09-25 21:00:45 +000052 if (Attrs & Attribute::ReadOnly)
Chris Lattner3e13b8c2008-01-02 23:42:30 +000053 Result += "readonly ";
Devang Patela05633e2008-09-26 22:53:05 +000054 if (Attrs & Attribute::OptimizeForSize)
55 Result += "optsize ";
56 if (Attrs & Attribute::NoInline)
57 Result += "noinline ";
58 if (Attrs & Attribute::AlwaysInline)
59 Result += "alwaysinline ";
Bill Wendlingccb67a3d2008-11-13 01:02:14 +000060 if (Attrs & Attribute::StackProtect)
61 Result += "ssp ";
62 if (Attrs & Attribute::StackProtectReq)
63 Result += "sspreq ";
Devang Patel72a4d2f2009-06-04 22:05:33 +000064 if (Attrs & Attribute::NoRedZone)
65 Result += "noredzone ";
Devang Pateld1c7d342009-06-05 21:57:13 +000066 if (Attrs & Attribute::NoImplicitFloat)
67 Result += "noimplicitfloat ";
Anton Korobeynikovc8ce7b082009-07-17 18:07:26 +000068 if (Attrs & Attribute::Naked)
69 Result += "naked ";
Devang Patel4c758ea2008-09-25 21:00:45 +000070 if (Attrs & Attribute::Alignment) {
Dale Johannesen11a555e2008-02-19 23:51:49 +000071 Result += "align ";
Nick Lewycky93787d12009-01-11 17:02:06 +000072 Result += utostr(Attribute::getAlignmentFromAttrs(Attrs));
Dale Johannesen11a555e2008-02-19 23:51:49 +000073 Result += " ";
74 }
Dan Gohman1a70bcc2008-08-05 15:51:44 +000075 // Trim the trailing space.
Nick Lewycky8d69f482008-12-19 09:38:31 +000076 assert(!Result.empty() && "Unknown attribute!");
Dan Gohman1a70bcc2008-08-05 15:51:44 +000077 Result.erase(Result.end()-1);
Chris Lattner3e13b8c2008-01-02 23:42:30 +000078 return Result;
79}
80
Devang Patel4c758ea2008-09-25 21:00:45 +000081Attributes Attribute::typeIncompatible(const Type *Ty) {
Devang Patelba3fa6c2008-09-23 23:03:40 +000082 Attributes Incompatible = None;
Chris Lattner8a923e72008-03-12 17:45:29 +000083
84 if (!Ty->isInteger())
85 // Attributes that only apply to integers.
86 Incompatible |= SExt | ZExt;
87
88 if (!isa<PointerType>(Ty))
89 // Attributes that only apply to pointers.
Nick Lewycky8d69f482008-12-19 09:38:31 +000090 Incompatible |= ByVal | Nest | NoAlias | StructRet | NoCapture;
Chris Lattner8a923e72008-03-12 17:45:29 +000091
92 return Incompatible;
Chris Lattner3e13b8c2008-01-02 23:42:30 +000093}
94
Chris Lattner8a923e72008-03-12 17:45:29 +000095//===----------------------------------------------------------------------===//
Devang Patel00095052008-09-24 00:29:49 +000096// AttributeListImpl Definition
Chris Lattner8a923e72008-03-12 17:45:29 +000097//===----------------------------------------------------------------------===//
Chris Lattner3e13b8c2008-01-02 23:42:30 +000098
Chris Lattner8a923e72008-03-12 17:45:29 +000099namespace llvm {
Devang Patel00095052008-09-24 00:29:49 +0000100class AttributeListImpl : public FoldingSetNode {
Owen Andersonc1a3a472009-08-20 19:03:20 +0000101 sys::cas_flag RefCount;
Chris Lattner8a923e72008-03-12 17:45:29 +0000102
Devang Patel4c758ea2008-09-25 21:00:45 +0000103 // AttributesList is uniqued, these should not be publicly available.
Devang Patel00095052008-09-24 00:29:49 +0000104 void operator=(const AttributeListImpl &); // Do not implement
105 AttributeListImpl(const AttributeListImpl &); // Do not implement
106 ~AttributeListImpl(); // Private implementation
Chris Lattner8a923e72008-03-12 17:45:29 +0000107public:
Devang Patel4c758ea2008-09-25 21:00:45 +0000108 SmallVector<AttributeWithIndex, 4> Attrs;
Chris Lattner8a923e72008-03-12 17:45:29 +0000109
Devang Patel4c758ea2008-09-25 21:00:45 +0000110 AttributeListImpl(const AttributeWithIndex *Attr, unsigned NumAttrs)
Chris Lattner8a923e72008-03-12 17:45:29 +0000111 : Attrs(Attr, Attr+NumAttrs) {
112 RefCount = 0;
113 }
114
Owen Andersonc1a3a472009-08-20 19:03:20 +0000115 void AddRef() { sys::AtomicIncrement(&RefCount); }
116 void DropRef() {
117 sys::cas_flag old = sys::AtomicDecrement(&RefCount);
118 if (old == 0) delete this;
119 }
Chris Lattner8a923e72008-03-12 17:45:29 +0000120
121 void Profile(FoldingSetNodeID &ID) const {
Jay Foad7d0479f2009-05-21 09:52:38 +0000122 Profile(ID, Attrs.data(), Attrs.size());
Chris Lattner8a923e72008-03-12 17:45:29 +0000123 }
Devang Patel4c758ea2008-09-25 21:00:45 +0000124 static void Profile(FoldingSetNodeID &ID, const AttributeWithIndex *Attr,
Chris Lattner8a923e72008-03-12 17:45:29 +0000125 unsigned NumAttrs) {
126 for (unsigned i = 0; i != NumAttrs; ++i)
127 ID.AddInteger(uint64_t(Attr[i].Attrs) << 32 | unsigned(Attr[i].Index));
128 }
129};
130}
131
Owen Andersond91e6b02009-08-17 17:10:58 +0000132static ManagedStatic<sys::SmartMutex<true> > ALMutex;
Devang Patel4c758ea2008-09-25 21:00:45 +0000133static ManagedStatic<FoldingSet<AttributeListImpl> > AttributesLists;
Chris Lattner8a923e72008-03-12 17:45:29 +0000134
Devang Patel00095052008-09-24 00:29:49 +0000135AttributeListImpl::~AttributeListImpl() {
Owen Andersond91e6b02009-08-17 17:10:58 +0000136 sys::SmartScopedLock<true> Lock(*ALMutex);
Devang Patel4c758ea2008-09-25 21:00:45 +0000137 AttributesLists->RemoveNode(this);
Chris Lattner8a923e72008-03-12 17:45:29 +0000138}
139
140
Devang Patel4c758ea2008-09-25 21:00:45 +0000141AttrListPtr AttrListPtr::get(const AttributeWithIndex *Attrs, unsigned NumAttrs) {
142 // If there are no attributes then return a null AttributesList pointer.
Chris Lattner8a923e72008-03-12 17:45:29 +0000143 if (NumAttrs == 0)
Devang Patel4c758ea2008-09-25 21:00:45 +0000144 return AttrListPtr();
Chris Lattner8a923e72008-03-12 17:45:29 +0000145
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000146#ifndef NDEBUG
Chris Lattner8a923e72008-03-12 17:45:29 +0000147 for (unsigned i = 0; i != NumAttrs; ++i) {
Devang Patel4c758ea2008-09-25 21:00:45 +0000148 assert(Attrs[i].Attrs != Attribute::None &&
149 "Pointless attribute!");
Chris Lattner8a923e72008-03-12 17:45:29 +0000150 assert((!i || Attrs[i-1].Index < Attrs[i].Index) &&
Devang Patel4c758ea2008-09-25 21:00:45 +0000151 "Misordered AttributesList!");
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000152 }
153#endif
Chris Lattner8a923e72008-03-12 17:45:29 +0000154
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000155 // Otherwise, build a key to look up the existing attributes.
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000156 FoldingSetNodeID ID;
Devang Patel00095052008-09-24 00:29:49 +0000157 AttributeListImpl::Profile(ID, Attrs, NumAttrs);
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000158 void *InsertPos;
Owen Andersond91e6b02009-08-17 17:10:58 +0000159
160 sys::SmartScopedLock<true> Lock(*ALMutex);
161
Devang Patel00095052008-09-24 00:29:49 +0000162 AttributeListImpl *PAL =
Devang Patel4c758ea2008-09-25 21:00:45 +0000163 AttributesLists->FindNodeOrInsertPos(ID, InsertPos);
Chris Lattner8a923e72008-03-12 17:45:29 +0000164
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000165 // If we didn't find any existing attributes of the same shape then
166 // create a new one and insert it.
167 if (!PAL) {
Devang Patel00095052008-09-24 00:29:49 +0000168 PAL = new AttributeListImpl(Attrs, NumAttrs);
Devang Patel4c758ea2008-09-25 21:00:45 +0000169 AttributesLists->InsertNode(PAL, InsertPos);
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000170 }
Chris Lattner8a923e72008-03-12 17:45:29 +0000171
Devang Patel4c758ea2008-09-25 21:00:45 +0000172 // Return the AttributesList that we found or created.
173 return AttrListPtr(PAL);
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000174}
175
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000176
Chris Lattner8a923e72008-03-12 17:45:29 +0000177//===----------------------------------------------------------------------===//
Devang Patel4c758ea2008-09-25 21:00:45 +0000178// AttrListPtr Method Implementations
Chris Lattner8a923e72008-03-12 17:45:29 +0000179//===----------------------------------------------------------------------===//
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000180
Devang Patel4c758ea2008-09-25 21:00:45 +0000181AttrListPtr::AttrListPtr(AttributeListImpl *LI) : AttrList(LI) {
Chris Lattner8a923e72008-03-12 17:45:29 +0000182 if (LI) LI->AddRef();
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000183}
184
Devang Patel4c758ea2008-09-25 21:00:45 +0000185AttrListPtr::AttrListPtr(const AttrListPtr &P) : AttrList(P.AttrList) {
186 if (AttrList) AttrList->AddRef();
Chris Lattner8a923e72008-03-12 17:45:29 +0000187}
188
Devang Patel4c758ea2008-09-25 21:00:45 +0000189const AttrListPtr &AttrListPtr::operator=(const AttrListPtr &RHS) {
190 if (AttrList == RHS.AttrList) return *this;
191 if (AttrList) AttrList->DropRef();
192 AttrList = RHS.AttrList;
193 if (AttrList) AttrList->AddRef();
Chris Lattner8a923e72008-03-12 17:45:29 +0000194 return *this;
195}
196
Devang Patel4c758ea2008-09-25 21:00:45 +0000197AttrListPtr::~AttrListPtr() {
198 if (AttrList) AttrList->DropRef();
Chris Lattner8a923e72008-03-12 17:45:29 +0000199}
200
201/// getNumSlots - Return the number of slots used in this attribute list.
202/// This is the number of arguments that have an attribute set on them
203/// (including the function itself).
Devang Patel4c758ea2008-09-25 21:00:45 +0000204unsigned AttrListPtr::getNumSlots() const {
205 return AttrList ? AttrList->Attrs.size() : 0;
Chris Lattner8a923e72008-03-12 17:45:29 +0000206}
207
Devang Patel4c758ea2008-09-25 21:00:45 +0000208/// getSlot - Return the AttributeWithIndex at the specified slot. This
209/// holds a number plus a set of attributes.
210const AttributeWithIndex &AttrListPtr::getSlot(unsigned Slot) const {
211 assert(AttrList && Slot < AttrList->Attrs.size() && "Slot # out of range!");
212 return AttrList->Attrs[Slot];
Chris Lattner8a923e72008-03-12 17:45:29 +0000213}
214
215
Devang Patel4c758ea2008-09-25 21:00:45 +0000216/// getAttributes - The attributes for the specified index are
217/// returned. Attributes for the result are denoted with Idx = 0.
Devang Patel82fed672008-09-23 22:35:17 +0000218/// Function notes are denoted with idx = ~0.
Devang Patel4c758ea2008-09-25 21:00:45 +0000219Attributes AttrListPtr::getAttributes(unsigned Idx) const {
220 if (AttrList == 0) return Attribute::None;
Chris Lattner8a923e72008-03-12 17:45:29 +0000221
Devang Patel4c758ea2008-09-25 21:00:45 +0000222 const SmallVector<AttributeWithIndex, 4> &Attrs = AttrList->Attrs;
Chris Lattner8a923e72008-03-12 17:45:29 +0000223 for (unsigned i = 0, e = Attrs.size(); i != e && Attrs[i].Index <= Idx; ++i)
224 if (Attrs[i].Index == Idx)
225 return Attrs[i].Attrs;
Devang Patel4c758ea2008-09-25 21:00:45 +0000226 return Attribute::None;
Chris Lattner8a923e72008-03-12 17:45:29 +0000227}
228
229/// hasAttrSomewhere - Return true if the specified attribute is set for at
230/// least one parameter or for the return value.
Devang Patel4c758ea2008-09-25 21:00:45 +0000231bool AttrListPtr::hasAttrSomewhere(Attributes Attr) const {
232 if (AttrList == 0) return false;
Chris Lattner8a923e72008-03-12 17:45:29 +0000233
Devang Patel4c758ea2008-09-25 21:00:45 +0000234 const SmallVector<AttributeWithIndex, 4> &Attrs = AttrList->Attrs;
Chris Lattner8a923e72008-03-12 17:45:29 +0000235 for (unsigned i = 0, e = Attrs.size(); i != e; ++i)
236 if (Attrs[i].Attrs & Attr)
237 return true;
238 return false;
239}
240
241
Devang Patel4c758ea2008-09-25 21:00:45 +0000242AttrListPtr AttrListPtr::addAttr(unsigned Idx, Attributes Attrs) const {
243 Attributes OldAttrs = getAttributes(Idx);
Dale Johannesen11a555e2008-02-19 23:51:49 +0000244#ifndef NDEBUG
245 // FIXME it is not obvious how this should work for alignment.
246 // For now, say we can't change a known alignment.
Devang Patel4c758ea2008-09-25 21:00:45 +0000247 Attributes OldAlign = OldAttrs & Attribute::Alignment;
248 Attributes NewAlign = Attrs & Attribute::Alignment;
Anton Korobeynikov18991d72008-02-20 12:07:57 +0000249 assert((!OldAlign || !NewAlign || OldAlign == NewAlign) &&
Dale Johannesen11a555e2008-02-19 23:51:49 +0000250 "Attempt to change alignment!");
251#endif
Chris Lattner8a923e72008-03-12 17:45:29 +0000252
Devang Patelba3fa6c2008-09-23 23:03:40 +0000253 Attributes NewAttrs = OldAttrs | Attrs;
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000254 if (NewAttrs == OldAttrs)
Chris Lattner8a923e72008-03-12 17:45:29 +0000255 return *this;
256
Devang Patel4c758ea2008-09-25 21:00:45 +0000257 SmallVector<AttributeWithIndex, 8> NewAttrList;
258 if (AttrList == 0)
259 NewAttrList.push_back(AttributeWithIndex::get(Idx, Attrs));
Chris Lattner8a923e72008-03-12 17:45:29 +0000260 else {
Devang Patel4c758ea2008-09-25 21:00:45 +0000261 const SmallVector<AttributeWithIndex, 4> &OldAttrList = AttrList->Attrs;
Chris Lattner8a923e72008-03-12 17:45:29 +0000262 unsigned i = 0, e = OldAttrList.size();
263 // Copy attributes for arguments before this one.
264 for (; i != e && OldAttrList[i].Index < Idx; ++i)
265 NewAttrList.push_back(OldAttrList[i]);
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000266
Chris Lattner8a923e72008-03-12 17:45:29 +0000267 // If there are attributes already at this index, merge them in.
268 if (i != e && OldAttrList[i].Index == Idx) {
269 Attrs |= OldAttrList[i].Attrs;
270 ++i;
271 }
272
Devang Patel4c758ea2008-09-25 21:00:45 +0000273 NewAttrList.push_back(AttributeWithIndex::get(Idx, Attrs));
Chris Lattner8a923e72008-03-12 17:45:29 +0000274
275 // Copy attributes for arguments after this one.
276 NewAttrList.insert(NewAttrList.end(),
277 OldAttrList.begin()+i, OldAttrList.end());
278 }
279
Jay Foad7d0479f2009-05-21 09:52:38 +0000280 return get(NewAttrList.data(), NewAttrList.size());
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000281}
282
Devang Patel4c758ea2008-09-25 21:00:45 +0000283AttrListPtr AttrListPtr::removeAttr(unsigned Idx, Attributes Attrs) const {
Dale Johannesen11a555e2008-02-19 23:51:49 +0000284#ifndef NDEBUG
285 // FIXME it is not obvious how this should work for alignment.
286 // For now, say we can't pass in alignment, which no current use does.
Devang Patel4c758ea2008-09-25 21:00:45 +0000287 assert(!(Attrs & Attribute::Alignment) && "Attempt to exclude alignment!");
Dale Johannesen11a555e2008-02-19 23:51:49 +0000288#endif
Devang Patel4c758ea2008-09-25 21:00:45 +0000289 if (AttrList == 0) return AttrListPtr();
Chris Lattner8a923e72008-03-12 17:45:29 +0000290
Devang Patel4c758ea2008-09-25 21:00:45 +0000291 Attributes OldAttrs = getAttributes(Idx);
Devang Patelba3fa6c2008-09-23 23:03:40 +0000292 Attributes NewAttrs = OldAttrs & ~Attrs;
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000293 if (NewAttrs == OldAttrs)
Chris Lattner8a923e72008-03-12 17:45:29 +0000294 return *this;
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000295
Devang Patel4c758ea2008-09-25 21:00:45 +0000296 SmallVector<AttributeWithIndex, 8> NewAttrList;
297 const SmallVector<AttributeWithIndex, 4> &OldAttrList = AttrList->Attrs;
Chris Lattner8a923e72008-03-12 17:45:29 +0000298 unsigned i = 0, e = OldAttrList.size();
299
300 // Copy attributes for arguments before this one.
301 for (; i != e && OldAttrList[i].Index < Idx; ++i)
302 NewAttrList.push_back(OldAttrList[i]);
303
304 // If there are attributes already at this index, merge them in.
305 assert(OldAttrList[i].Index == Idx && "Attribute isn't set?");
306 Attrs = OldAttrList[i].Attrs & ~Attrs;
307 ++i;
308 if (Attrs) // If any attributes left for this parameter, add them.
Devang Patel4c758ea2008-09-25 21:00:45 +0000309 NewAttrList.push_back(AttributeWithIndex::get(Idx, Attrs));
Chris Lattner8a923e72008-03-12 17:45:29 +0000310
311 // Copy attributes for arguments after this one.
312 NewAttrList.insert(NewAttrList.end(),
313 OldAttrList.begin()+i, OldAttrList.end());
314
Jay Foad7d0479f2009-05-21 09:52:38 +0000315 return get(NewAttrList.data(), NewAttrList.size());
Chris Lattner3e13b8c2008-01-02 23:42:30 +0000316}
317
Devang Patel4c758ea2008-09-25 21:00:45 +0000318void AttrListPtr::dump() const {
Chris Lattner8a923e72008-03-12 17:45:29 +0000319 cerr << "PAL[ ";
320 for (unsigned i = 0; i < getNumSlots(); ++i) {
Devang Patel4c758ea2008-09-25 21:00:45 +0000321 const AttributeWithIndex &PAWI = getSlot(i);
Chris Lattner8a923e72008-03-12 17:45:29 +0000322 cerr << "{" << PAWI.Index << "," << PAWI.Attrs << "} ";
323 }
324
325 cerr << "]\n";
Duncan Sands404eb052008-01-06 18:27:01 +0000326}