[llvm-commits] [llvm] r107014 - /llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
Gabor Greif
ggreif at gmail.com
Mon Jun 28 09:40:52 PDT 2010
Author: ggreif
Date: Mon Jun 28 11:40:52 2010
New Revision: 107014
URL: http://llvm.org/viewvc/llvm-project?rev=107014&view=rev
Log:
simplify: we have solid argument iterator range
Modified:
llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp?rev=107014&r1=107013&r2=107014&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp Mon Jun 28 11:40:52 2010
@@ -383,24 +383,21 @@
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.
More information about the llvm-commits
mailing list