The personality function should be a Function* and not just a Value*.

llvm-svn: 136392
This commit is contained in:
Bill Wendling
2011-07-28 21:14:13 +00:00
parent a3e41533f2
commit 4f027233d2
7 changed files with 23 additions and 16 deletions

View File

@@ -2539,7 +2539,8 @@ bool BitcodeReader::ParseFunctionBody(Function *F) {
bool IsCleanup = !!Record[Idx++];
unsigned NumClauses = Record[Idx++];
LandingPadInst *LP = LandingPadInst::Create(Ty, PersFn, NumClauses);
LandingPadInst *LP = LandingPadInst::Create(Ty, cast<Function>(PersFn),
NumClauses);
LP->setCleanup(IsCleanup);
for (unsigned J = 0; J != NumClauses; ++J) {
LandingPadInst::ClauseType CT =