mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
simplify: we have solid argument iterator range
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107014 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8d121694a3
commit
32621ad9ff
@ -383,24 +383,21 @@ bool DwarfEHPrepare::HandleURoRInvokes() {
|
|||||||
SI = SelsToConvert.begin(), SE = SelsToConvert.end();
|
SI = SelsToConvert.begin(), SE = SelsToConvert.end();
|
||||||
SI != SE; ++SI) {
|
SI != SE; ++SI) {
|
||||||
IntrinsicInst *II = *SI;
|
IntrinsicInst *II = *SI;
|
||||||
SmallVector<Value*, 8> Args;
|
|
||||||
|
|
||||||
// Use the exception object pointer and the personality function
|
// Use the exception object pointer and the personality function
|
||||||
// from the original selector.
|
// from the original selector.
|
||||||
CallSite CS(II);
|
CallSite CS(II);
|
||||||
IntrinsicInst::op_iterator I = CS.arg_begin();
|
IntrinsicInst::op_iterator I = CS.arg_begin();
|
||||||
Args.push_back(*I++); // Exception object pointer.
|
|
||||||
Args.push_back(*I++); // Personality function.
|
|
||||||
|
|
||||||
IntrinsicInst::op_iterator E = CS.arg_end();
|
IntrinsicInst::op_iterator E = CS.arg_end();
|
||||||
IntrinsicInst::op_iterator B = prior(E);
|
IntrinsicInst::op_iterator B = prior(E);
|
||||||
|
|
||||||
// Exclude last argument if it is an integer.
|
// Exclude last argument if it is an integer.
|
||||||
if (isa<ConstantInt>(B)) E = B;
|
if (isa<ConstantInt>(B)) E = B;
|
||||||
|
|
||||||
// Add in any filter IDs.
|
// Add exception object pointer (front).
|
||||||
for (; I != E; ++I)
|
// Add personality function (next).
|
||||||
Args.push_back(*I);
|
// Add in any filter IDs (rest).
|
||||||
|
SmallVector<Value*, 8> Args(I, E);
|
||||||
|
|
||||||
Args.push_back(EHCatchAllValue->getInitializer()); // Catch-all indicator.
|
Args.push_back(EHCatchAllValue->getInitializer()); // Catch-all indicator.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user