[llvm-branch-commits] [llvm-branch] r100465 - /llvm/branches/ggreif/CallInst-operands/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
Gabor Greif
ggreif at gmail.com
Mon Apr 5 14:13:20 PDT 2010
Author: ggreif
Date: Mon Apr 5 16:13:20 2010
New Revision: 100465
URL: http://llvm.org/viewvc/llvm-project?rev=100465&view=rev
Log:
shift operands (I am not completely sure about this)
Modified:
llvm/branches/ggreif/CallInst-operands/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
Modified: llvm/branches/ggreif/CallInst-operands/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/CallInst-operands/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp?rev=100465&r1=100464&r2=100465&view=diff
==============================================================================
--- llvm/branches/ggreif/CallInst-operands/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp (original)
+++ llvm/branches/ggreif/CallInst-operands/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp Mon Apr 5 16:13:20 2010
@@ -300,7 +300,7 @@
void llvm::AddCatchInfo(CallInst &I, MachineModuleInfo *MMI,
MachineBasicBlock *MBB) {
// Inform the MachineModuleInfo of the personality for this landing pad.
- ConstantExpr *CE = cast<ConstantExpr>(I.getOperand(2));
+ ConstantExpr *CE = cast<ConstantExpr>(I.getOperand(1));
assert(CE->getOpcode() == Instruction::BitCast &&
isa<Function>(CE->getOperand(0)) &&
"Personality should be a function");
@@ -311,7 +311,7 @@
std::vector<GlobalVariable *> TyInfo;
unsigned N = I.getNumOperands();
- for (unsigned i = N - 1; i > 2; --i) {
+ for (unsigned i = N - 2; i > 1; --i) {
if (ConstantInt *CI = dyn_cast<ConstantInt>(I.getOperand(i))) {
unsigned FilterLength = CI->getZExtValue();
unsigned FirstCatch = i + FilterLength + !FilterLength;
@@ -343,7 +343,7 @@
if (N > 3) {
TyInfo.reserve(N - 3);
- for (unsigned j = 3; j < N; ++j)
+ for (unsigned j = 2; j < N - 1; ++j)
TyInfo.push_back(ExtractTypeInfo(I.getOperand(j)));
MMI->addCatchTypeInfo(MBB, TyInfo);
}
More information about the llvm-branch-commits
mailing list