From 8c7c17354c7d954de95a064ee89f8c82cccdb819 Mon Sep 17 00:00:00 2001 From: Anton Korobeynikov Date: Sun, 13 May 2007 15:42:26 +0000 Subject: 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 --- include/llvm/CodeGen/MachineModuleInfo.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'include/llvm/CodeGen/MachineModuleInfo.h') 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 TypeInfos; - Function *Personality; + // Personalities - Vector of all personality functions ever seen. Used to emit + // common EH frames. + std::vector 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& 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 &getLandingPads() const { return LandingPads; -- cgit v1.2.3