, RootScope(NULL)
, FrameMoves()
, LandingPads()
+, Personality(NULL)
{}
MachineModuleInfo::~MachineModuleInfo() {
/// addPersonality - Provide the personality function for the exception
/// information.
void MachineModuleInfo::addPersonality(MachineBasicBlock *LandingPad,
- Function *Personality) {
+ Function *PersFn) {
LandingPadInfo &LP = getOrCreateLandingPadInfo(LandingPad);
- LP.Personality = Personality;
+ LP.Personality = PersFn;
+
+ // FIXME: Until PR1414 will be fixed, we're using 1 personality function per
+ // module
+ Personality = PersFn;
}
/// addCatchTypeInfo - Provide the catch typeinfo for a landing pad.
/// getLandingPadInfos - Return a reference to the landing pad info for the
/// current function.
Function *MachineModuleInfo::getPersonality() const {
- return !LandingPads.empty() ? LandingPads[0].Personality : NULL;
+ // FIXME: Until PR1414 will be fixed, we're using 1 personality function per
+ // module
+
+ //return !LandingPads.empty() ? LandingPads[0].Personality : NULL;
+ return Personality;
}