diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2007-05-13 15:42:26 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2007-05-13 15:42:26 +0000 |
commit | 8c7c17354c7d954de95a064ee89f8c82cccdb819 (patch) | |
tree | 7f901638144cecef38421a01b7a4012cd7622300 /include/llvm/CodeGen/MachineModuleInfo.h | |
parent | 69b3e40196f837d5dbc484cd708b6e0489085787 (diff) |
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
Diffstat (limited to 'include/llvm/CodeGen/MachineModuleInfo.h')
-rw-r--r-- | include/llvm/CodeGen/MachineModuleInfo.h | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index 3c04c8c489..4e7ce5b8f1 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -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; |