diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-06-28 16:40:52 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-06-28 16:40:52 +0000 |
commit | 32621ad9ff9ae7deafe72873ed83f39e7b28ae83 (patch) | |
tree | 9ccf05409777acb7d7c701f90189a6458e22b491 /lib/CodeGen | |
parent | 8d121694a3eaf377e3229a7fa325e81e83cbb2fb (diff) | |
download | external_llvm-32621ad9ff9ae7deafe72873ed83f39e7b28ae83.zip external_llvm-32621ad9ff9ae7deafe72873ed83f39e7b28ae83.tar.gz external_llvm-32621ad9ff9ae7deafe72873ed83f39e7b28ae83.tar.bz2 |
simplify: we have solid argument iterator range
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107014 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/DwarfEHPrepare.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lib/CodeGen/DwarfEHPrepare.cpp b/lib/CodeGen/DwarfEHPrepare.cpp index 007289c..3fb4019 100644 --- a/lib/CodeGen/DwarfEHPrepare.cpp +++ b/lib/CodeGen/DwarfEHPrepare.cpp @@ -383,24 +383,21 @@ bool DwarfEHPrepare::HandleURoRInvokes() { SI = SelsToConvert.begin(), SE = SelsToConvert.end(); SI != SE; ++SI) { IntrinsicInst *II = *SI; - SmallVector<Value*, 8> Args; // Use the exception object pointer and the personality function // from the original selector. CallSite CS(II); 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 B = prior(E); // Exclude last argument if it is an integer. if (isa<ConstantInt>(B)) E = B; - // Add in any filter IDs. - for (; I != E; ++I) - Args.push_back(*I); + // Add exception object pointer (front). + // Add personality function (next). + // Add in any filter IDs (rest). + SmallVector<Value*, 8> Args(I, E); Args.push_back(EHCatchAllValue->getInitializer()); // Catch-all indicator. |