aboutsummaryrefslogtreecommitdiffstats
path: root/lib/IR/AttributeImpl.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-27 21:20:06 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-27 21:20:06 +0000
commita5372d270864316fb0752dd366f03fc1b45c6143 (patch)
treee086b99fbff9086600fe07e9578532b14c4457f1 /lib/IR/AttributeImpl.h
parent0fef46f50e116e9aa0811ba8eb605d82ab64faed (diff)
downloadexternal_llvm-a5372d270864316fb0752dd366f03fc1b45c6143.zip
external_llvm-a5372d270864316fb0752dd366f03fc1b45c6143.tar.gz
external_llvm-a5372d270864316fb0752dd366f03fc1b45c6143.tar.bz2
Start using more of the AttrNode in the AttributeSetImpl class.
Also add some asserts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173627 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/AttributeImpl.h')
-rw-r--r--lib/IR/AttributeImpl.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/IR/AttributeImpl.h b/lib/IR/AttributeImpl.h
index b4c788f..2aba3c4 100644
--- a/lib/IR/AttributeImpl.h
+++ b/lib/IR/AttributeImpl.h
@@ -116,15 +116,14 @@ class AttributeSetImpl : public FoldingSetNode {
AttributeSetImpl(const AttributeSetImpl &) LLVM_DELETED_FUNCTION;
public:
AttributeSetImpl(LLVMContext &C, ArrayRef<AttributeWithIndex> attrs);
- AttributeSetImpl(LLVMContext &C,
- ArrayRef<std::pair<uint64_t, AttributeSetNode*> > attrs);
LLVMContext &getContext() { return Context; }
ArrayRef<AttributeWithIndex> getAttributes() const { return AttrList; }
- unsigned getNumAttributes() const { return AttrList.size(); }
+ unsigned getNumAttributes() const {
+ return AttrNodes.size();
+ }
unsigned getSlotIndex(unsigned Slot) const {
- // FIXME: This needs to use AttrNodes instead.
- return AttrList[Slot].Index;
+ return AttrNodes[Slot].first;
}
AttributeSet getSlotAttributes(unsigned Slot) const {
// FIXME: This needs to use AttrNodes instead.