/// attribute enties, which are for target-dependent attributes.
class EnumAttributeImpl : public AttributeImpl {
+ virtual void anchor();
Attribute::AttrKind Kind;
protected:
};
class AlignAttributeImpl : public EnumAttributeImpl {
+ virtual void anchor();
unsigned Align;
public:
};
class StringAttributeImpl : public AttributeImpl {
+ virtual void anchor();
std::string Kind;
std::string Val;
AttributeSetImpl(LLVMContext &C,
ArrayRef<std::pair<unsigned, AttributeSetNode *> > Attrs)
: Context(C), NumAttrs(Attrs.size()) {
+#ifndef NDEBUG
+ if (Attrs.size() >= 2) {
+ for (const std::pair<unsigned, AttributeSetNode *> *i = Attrs.begin() + 1,
+ *e = Attrs.end();
+ i != e; ++i) {
+ assert((i-1)->first <= i->first && "Attribute set not ordered!");
+ }
+ }
+#endif
// There's memory after the node where we can store the entries in.
std::copy(Attrs.begin(), Attrs.end(),
reinterpret_cast<IndexAttrPair *>(this + 1));
// FIXME: This atrocity is temporary.
uint64_t Raw(unsigned Index) const;
+
+ void dump() const;
};
} // end llvm namespace