Emit multiple common EH frames for multiple (including blank) personality

functions. This partly fixes PR1414: now we're restricted only to one
personality function per eh frame, not per module. Further work on
"multiple personalities" topic needs representative example.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37018 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov
2007-05-13 15:42:26 +00:00
parent 69b3e40196
commit 8c7c17354c
3 changed files with 65 additions and 37 deletions

View File

@@ -1020,7 +1020,9 @@ private:
//
std::vector<GlobalVariable *> TypeInfos;
Function *Personality;
// Personalities - Vector of all personality functions ever seen. Used to emit
// common EH frames.
std::vector<Function *> Personalities;
public:
static char ID; // Pass identification, replacement for typeid
@@ -1201,7 +1203,16 @@ public:
/// addPersonality - Provide the personality function for the exception
/// information.
void addPersonality(MachineBasicBlock *LandingPad, Function *Personality);
/// getPersonalityIndex - Get index of the current personality function inside
/// Personalitites array
unsigned getPersonalityIndex() const;
/// getPersonalities - Return array of personality functions ever seen.
const std::vector<Function *>& getPersonalities() const {
return Personalities;
}
/// addCatchTypeInfo - Provide the catch typeinfo for a landing pad.
///
void addCatchTypeInfo(MachineBasicBlock *LandingPad,
@@ -1219,7 +1230,7 @@ public:
/// pads.
void TidyLandingPads();
/// getLandingPadInfos - Return a reference to the landing pad info for the
/// getLandingPads - Return a reference to the landing pad info for the
/// current function.
const std::vector<LandingPadInfo> &getLandingPads() const {
return LandingPads;