diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:45:00 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:45:00 +0000 |
commit | 12f3ca4cdb95b193af905a00e722a4dcb40b3de3 (patch) | |
tree | ae1a7fcfc24a8d4b23206c57121c3f361d4b7f84 /lib/IR/Attributes.cpp | |
parent | d99dafe2e4a385dd2a6c76da6d8258deb100657b (diff) |
Diffstat (limited to 'lib/IR/Attributes.cpp')
-rw-r--r-- | lib/IR/Attributes.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index d690111ef210e..e30414537a6cc 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -955,13 +955,13 @@ AttributeList AttributeList::addAttribute(LLVMContext &C, for (unsigned Index : Indices) { // Add all attribute slots before the current index. for (; I < E && getSlotIndex(I) < Index; ++I) - AttrVec.emplace_back(getSlotIndex(I), pImpl->getSlotNode(I)); + AttrVec.emplace_back(getSlotIndex(I), pImpl->getSlotAttributes(I)); // Add the attribute at this index. If we already have attributes at this // index, merge them into a new set. AttrBuilder B; if (I < E && getSlotIndex(I) == Index) { - B.merge(AttrBuilder(pImpl->getSlotNode(I))); + B.merge(AttrBuilder(pImpl->getSlotAttributes(I))); ++I; } B.addAttribute(A); @@ -970,7 +970,7 @@ AttributeList AttributeList::addAttribute(LLVMContext &C, // Add remaining attributes. for (; I < E; ++I) - AttrVec.emplace_back(getSlotIndex(I), pImpl->getSlotNode(I)); + AttrVec.emplace_back(getSlotIndex(I), pImpl->getSlotAttributes(I)); return get(C, AttrVec); } @@ -1008,13 +1008,13 @@ AttributeList AttributeList::addAttributes(LLVMContext &C, unsigned Index, for (I = 0; I < NumAttrs; ++I) { if (getSlotIndex(I) >= Index) break; - AttrVec.emplace_back(getSlotIndex(I), pImpl->getSlotNode(I)); + AttrVec.emplace_back(getSlotIndex(I), pImpl->getSlotAttributes(I)); } AttrBuilder NewAttrs; if (I < NumAttrs && getSlotIndex(I) == Index) { // We need to merge the attribute sets. - NewAttrs.merge(pImpl->getSlotNode(I)); + NewAttrs.merge(pImpl->getSlotAttributes(I)); ++I; } NewAttrs.merge(B); @@ -1024,7 +1024,7 @@ AttributeList AttributeList::addAttributes(LLVMContext &C, unsigned Index, // Add the remaining entries. for (; I < NumAttrs; ++I) - AttrVec.emplace_back(getSlotIndex(I), pImpl->getSlotNode(I)); + AttrVec.emplace_back(getSlotIndex(I), pImpl->getSlotAttributes(I)); return get(C, AttrVec); } @@ -1063,11 +1063,11 @@ AttributeList AttributeList::removeAttributes(LLVMContext &C, unsigned Index, for (unsigned I = 0, E = NumAttrs; I != E; ++I) { if (getSlotIndex(I) >= Index) { if (getSlotIndex(I) == Index) - B = AttrBuilder(pImpl->getSlotNode(LastIndex++)); + B = AttrBuilder(getSlotAttributes(LastIndex++)); break; } LastIndex = I + 1; - AttrSets.push_back({getSlotIndex(I), pImpl->getSlotNode(I)}); + AttrSets.push_back({getSlotIndex(I), getSlotAttributes(I)}); } // Remove the attributes from the existing set and add them. @@ -1077,7 +1077,7 @@ AttributeList AttributeList::removeAttributes(LLVMContext &C, unsigned Index, // Add the remaining attribute slots. for (unsigned I = LastIndex, E = NumAttrs; I < E; ++I) - AttrSets.push_back({getSlotIndex(I), pImpl->getSlotNode(I)}); + AttrSets.push_back({getSlotIndex(I), getSlotAttributes(I)}); return get(C, AttrSets); } @@ -1091,7 +1091,7 @@ AttributeList AttributeList::removeAttributes(LLVMContext &C, for (unsigned I = 0, E = pImpl->getNumSlots(); I != E; ++I) { unsigned Index = getSlotIndex(I); if (Index != WithoutIndex) - AttrSet.push_back({Index, pImpl->getSlotNode(I)}); + AttrSet.push_back({Index, pImpl->getSlotAttributes(I)}); } return get(C, AttrSet); } @@ -1220,7 +1220,7 @@ AttributeSet AttributeList::getAttributes(unsigned Index) const { // Loop through to find the attribute node we want. for (unsigned I = 0, E = pImpl->getNumSlots(); I != E; ++I) if (pImpl->getSlotIndex(I) == Index) - return pImpl->getSlotNode(I); + return pImpl->getSlotAttributes(I); return AttributeSet(); } @@ -1251,7 +1251,7 @@ unsigned AttributeList::getSlotIndex(unsigned Slot) const { return pImpl->getSlotIndex(Slot); } -AttributeList AttributeList::getSlotAttributes(unsigned Slot) const { +AttributeSet AttributeList::getSlotAttributes(unsigned Slot) const { assert(pImpl && Slot < pImpl->getNumSlots() && "Slot # out of range!"); return pImpl->getSlotAttributes(Slot); |