summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-06-28 16:40:52 +0000
committerGabor Greif <ggreif@gmail.com>2010-06-28 16:40:52 +0000
commitcd09869dfce704fc8bd0d3662b32c1b185122161 (patch)
tree621e30c8db720ea75bd6cae638ee95d3302218bc
parent875a29601139f7124ef5e0ceae9d29fd2e092ace (diff)
downloadbcm5719-llvm-cd09869dfce704fc8bd0d3662b32c1b185122161.tar.gz
bcm5719-llvm-cd09869dfce704fc8bd0d3662b32c1b185122161.zip
simplify: we have solid argument iterator range
llvm-svn: 107014
-rw-r--r--llvm/lib/CodeGen/DwarfEHPrepare.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/DwarfEHPrepare.cpp b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
index 007289ce771..3fb4019cccd 100644
--- a/llvm/lib/CodeGen/DwarfEHPrepare.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud