aboutsummaryrefslogtreecommitdiff
path: root/lib/IR/AttributeImpl.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-29 00:34:06 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-29 00:34:06 +0000
commitc22f4aa886443507f8406d30d118fdeeac6a8c6c (patch)
tree3fb78433e481242bf2d25bb0aa8e80360893795d /lib/IR/AttributeImpl.h
parentc0b3d4c9c252acec01de719d4e756456d5377e6d (diff)
Reorder some functions and add comments. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173733 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/AttributeImpl.h')
-rw-r--r--lib/IR/AttributeImpl.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/lib/IR/AttributeImpl.h b/lib/IR/AttributeImpl.h
index c00f094314..34754e8e54 100644
--- a/lib/IR/AttributeImpl.h
+++ b/lib/IR/AttributeImpl.h
@@ -37,20 +37,19 @@ class AttributeImpl : public FoldingSetNode {
void operator=(const AttributeImpl &) LLVM_DELETED_FUNCTION;
AttributeImpl(const AttributeImpl &) LLVM_DELETED_FUNCTION;
public:
- explicit AttributeImpl(LLVMContext &C, uint64_t data);
+ AttributeImpl(LLVMContext &C, Constant *Data)
+ : Context(C), Data(Data) {}
explicit AttributeImpl(LLVMContext &C, Attribute::AttrKind data);
AttributeImpl(LLVMContext &C, Attribute::AttrKind data,
ArrayRef<Constant*> values);
AttributeImpl(LLVMContext &C, StringRef data);
- LLVMContext &getContext() { return Context; }
-
- ArrayRef<Constant*> getValues() const { return Vals; }
-
bool hasAttribute(Attribute::AttrKind A) const;
-
bool hasAttributes() const;
+ LLVMContext &getContext() { return Context; }
+ ArrayRef<Constant*> getValues() const { return Vals; }
+
uint64_t getAlignment() const;
uint64_t getStackAlignment() const;
@@ -62,15 +61,19 @@ public:
bool operator<(const AttributeImpl &AI) const;
- uint64_t Raw() const; // FIXME: Remove.
-
- static uint64_t getAttrMask(Attribute::AttrKind Val);
-
void Profile(FoldingSetNodeID &ID) const {
Profile(ID, Data, Vals);
}
static void Profile(FoldingSetNodeID &ID, Constant *Data,
- ArrayRef<Constant*> Vals);
+ ArrayRef<Constant*> Vals) {
+ ID.AddPointer(Data);
+ for (unsigned I = 0, E = Vals.size(); I != E; ++I)
+ ID.AddPointer(Vals[I]);
+ }
+
+ // FIXME: Remove these!
+ uint64_t Raw() const;
+ static uint64_t getAttrMask(Attribute::AttrKind Val);
};
//===----------------------------------------------------------------------===//