#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/FoldingSet.h"
-#include "llvm/Support/MathExtras.h"
#include <cassert>
#include <string>
class AttrBuilder;
class AttributeImpl;
-class Constant;
+class AttributeSetImpl;
+class AttributeSetNode;
class LLVMContext;
class Type;
};
//===----------------------------------------------------------------------===//
-// AttributeSet Smart Pointer
-//===----------------------------------------------------------------------===//
-
-class AttrBuilder;
-class AttributeSetImpl;
-class AttributeSetNode;
-
-//===----------------------------------------------------------------------===//
/// \class
/// \brief This class manages the ref count for the opaque AttributeSetImpl
/// object and provides accessors for it.
iterator begin() { return Attrs.begin(); }
iterator end() { return Attrs.end(); }
+
const_iterator begin() const { return Attrs.begin(); }
const_iterator end() const { return Attrs.end(); }
#include "llvm/IR/Attributes.h"
#include "AttributeImpl.h"
#include "LLVMContextImpl.h"
-#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/Atomic.h"
using namespace llvm;
//===----------------------------------------------------------------------===//
-// Attribute Implementation
+// Attribute Construction Methods
//===----------------------------------------------------------------------===//
Attribute Attribute::get(LLVMContext &Context, AttrKind Kind) {
return get(Context, B.addStackAlignmentAttr(Align));
}
+//===----------------------------------------------------------------------===//
+// Attribute Accessor Methods
+//===----------------------------------------------------------------------===//
+
bool Attribute::hasAttribute(AttrKind Val) const {
return pImpl && pImpl->hasAttribute(Val);
}