[llvm-branch-commits] [llvm-gcc-branch] r78902 - /llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp
Bill Wendling
isanbard at gmail.com
Thu Aug 13 01:15:16 PDT 2009
Author: void
Date: Thu Aug 13 03:15:16 2009
New Revision: 78902
URL: http://llvm.org/viewvc/llvm-project?rev=78902&view=rev
Log:
--- Merging r78863 into '.':
U gcc/llvm-convert.cpp
Modified:
llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp?rev=78902&r1=78901&r2=78902&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Leela/gcc/llvm-convert.cpp Thu Aug 13 03:15:16 2009
@@ -2030,8 +2030,10 @@
// Figure out which landing pad to go to via the call_site
// FIXME: would this be better as a switch? Probably.
+ unsigned FirstPad = 0;
for (unsigned region = 1 ; region < LandingPads.size() ; ++region) {
if (LandingPads[region]) {
+ if (!FirstPad) FirstPad = region;
Value *RegionNo = ConstantInt::get(llvm::Type::Int32Ty, region - 1);
Value *Compare = Builder.CreateICmpEQ(CallSite, RegionNo);
// Branch on the compare.
@@ -2040,7 +2042,8 @@
EmitBlock(NextDispatch);
}
}
- Builder.CreateBr(LandingPads[1]);
+ assert(FirstPad && "EH dispatcher, but no landing pads present!");
+ Builder.CreateBr(LandingPads[FirstPad]);
}
}
More information about the llvm-branch-commits
mailing list