diff options
| author | Bill Wendling <isanbard@gmail.com> | 2013-01-25 21:46:52 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2013-01-25 21:46:52 +0000 |
| commit | 8649283e755272ac0814fec497a63947794a1b90 (patch) | |
| tree | b667b074f63127eae31982c918018460477a1983 /llvm/lib/Transforms | |
| parent | e6abe83258b67ea26417d35a11fb383a2d44e62c (diff) | |
| download | bcm5719-llvm-8649283e755272ac0814fec497a63947794a1b90.tar.gz bcm5719-llvm-8649283e755272ac0814fec497a63947794a1b90.zip | |
Use the new 'getSlotIndex' method to retrieve the attribute's slot index.
llvm-svn: 173499
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Transforms/IPO/GlobalOpt.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp index 3a38ca4bb8c..4603146ecfa 100644 --- a/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -272,9 +272,9 @@ bool DAE::DeleteDeadVarargs(Function &Fn) { // Drop any attributes that were on the vararg arguments. AttributeSet PAL = CS.getAttributes(); - if (!PAL.isEmpty() && PAL.getSlot(PAL.getNumSlots() - 1).Index > NumArgs) { + if (!PAL.isEmpty() && PAL.getSlotIndex(PAL.getNumSlots() - 1) > NumArgs) { SmallVector<AttributeWithIndex, 8> AttributesVec; - for (unsigned i = 0; PAL.getSlot(i).Index <= NumArgs; ++i) + for (unsigned i = 0; PAL.getSlotIndex(i) <= NumArgs; ++i) AttributesVec.push_back(PAL.getSlot(i)); if (PAL.hasAttributes(AttributeSet::FunctionIndex)) AttributesVec.push_back(AttributeWithIndex::get(Fn.getContext(), diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index 6fe4316d3bb..52d4e2fbba4 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/lib/Transforms/IPO/GlobalOpt.cpp @@ -2072,7 +2072,7 @@ static AttributeSet StripNest(LLVMContext &C, const AttributeSet &Attrs) { continue; // There can be only one. - return Attrs.removeAttribute(C, Attrs.getSlot(i).Index, Attribute::Nest); + return Attrs.removeAttribute(C, Attrs.getSlotIndex(i), Attribute::Nest); } return Attrs; diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp index 2fd35494b38..8555c2f030d 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -1101,7 +1101,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { // won't be dropping them. Check that these extra arguments have attributes // that are compatible with being a vararg call argument. for (unsigned i = CallerPAL.getNumSlots(); i; --i) { - if (CallerPAL.getSlot(i - 1).Index <= FT->getNumParams()) + if (CallerPAL.getSlotIndex(i - 1) <= FT->getNumParams()) break; Attribute PAttrs = CallerPAL.getSlot(i - 1).Attrs; // Check if it has an attribute that's incompatible with varargs. |

