aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-07-28 21:14:13 +0000
committerBill Wendling <isanbard@gmail.com>2011-07-28 21:14:13 +0000
commit7379b6650008fba555d5472d5c76e8efc59e8a21 (patch)
tree7d817da4daae05b68a4da09bb3927cd7d8407702 /include
parent6bd4842f89ef0f6a53b78664f9f3f2a1006117a9 (diff)
The personality function should be a Function* and not just a Value*.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136392 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Instructions.h14
-rw-r--r--include/llvm/Support/IRBuilder.h2
2 files changed, 9 insertions, 7 deletions
diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h
index f520310529..3e250d8527 100644
--- a/include/llvm/Instructions.h
+++ b/include/llvm/Instructions.h
@@ -1806,16 +1806,16 @@ private:
return User::operator new(s, 0);
}
void growOperands();
- void init(Value *PersFn, unsigned NumReservedValues, const Twine &NameStr);
+ void init(Function *PersFn, unsigned NumReservedValues, const Twine &NameStr);
- explicit LandingPadInst(Type *RetTy, Value *PersonalityFn,
+ explicit LandingPadInst(Type *RetTy, Function *PersonalityFn,
unsigned NumReservedValues, const Twine &NameStr,
Instruction *InsertBefore)
: Instruction(RetTy, Instruction::LandingPad, 0, 0, InsertBefore),
IsCleanup(false) {
init(PersonalityFn, 1 + NumReservedValues, NameStr);
}
- explicit LandingPadInst(Type *RetTy, Value *PersonalityFn,
+ explicit LandingPadInst(Type *RetTy, Function *PersonalityFn,
unsigned NumReservedValues, const Twine &NameStr,
BasicBlock *InsertAtEnd)
: Instruction(RetTy, Instruction::LandingPad, 0, 0, InsertAtEnd),
@@ -1825,14 +1825,14 @@ private:
protected:
virtual LandingPadInst *clone_impl() const;
public:
- static LandingPadInst *Create(Type *RetTy, Value *PersonalityFn,
+ static LandingPadInst *Create(Type *RetTy, Function *PersonalityFn,
unsigned NumReservedValues,
const Twine &NameStr = "",
Instruction *InsertBefore = 0) {
return new LandingPadInst(RetTy, PersonalityFn, NumReservedValues, NameStr,
InsertBefore);
}
- static LandingPadInst *Create(Type *RetTy, Value *PersonalityFn,
+ static LandingPadInst *Create(Type *RetTy, Function *PersonalityFn,
unsigned NumReservedValues,
const Twine &NameStr, BasicBlock *InsertAtEnd) {
return new LandingPadInst(RetTy, PersonalityFn, NumReservedValues, NameStr,
@@ -1845,7 +1845,9 @@ public:
/// getPersonalityFn - Get the personality function associated with this
/// landing pad.
- const Value *getPersonalityFn() const { return getOperand(0); }
+ const Function *getPersonalityFn() const {
+ return cast<Function>(getOperand(0));
+ }
// Simple accessors.
bool isCleanup() const { return IsCleanup; }
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h
index 7f89b247c4..542ee10cde 100644
--- a/include/llvm/Support/IRBuilder.h
+++ b/include/llvm/Support/IRBuilder.h
@@ -1198,7 +1198,7 @@ public:
return Insert(InsertValueInst::Create(Agg, Val, Idxs), Name);
}
- Value *CreateLandingPad(Type *Ty, Value *PersFn, unsigned NumClauses,
+ Value *CreateLandingPad(Type *Ty, Function *PersFn, unsigned NumClauses,
const Twine &Name = "") {
return Insert(LandingPadInst::Create(Ty, PersFn, NumClauses, Name));
}