From f25ddd991a5601d0101602c4c263a58c7af4b8a2 Mon Sep 17 00:00:00 2001 From: rdivacky Date: Tue, 16 Feb 2010 09:30:23 +0000 Subject: Update LLVM to r96341. --- include/llvm/CodeGen/MachineModuleInfo.h | 41 +++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 6 deletions(-) (limited to 'include/llvm/CodeGen/MachineModuleInfo.h') diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index d365029..8eeac9f 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -50,6 +50,7 @@ namespace llvm { //===----------------------------------------------------------------------===// // Forward declarations. class Constant; +class MCSymbol; class MDNode; class GlobalVariable; class MachineBasicBlock; @@ -66,6 +67,12 @@ class StructType; class MachineModuleInfoImpl { public: virtual ~MachineModuleInfoImpl(); + + typedef std::vector > + SymbolListTy; +protected: + static SymbolListTy + GetSortedStubs(const DenseMap &Map); }; @@ -113,7 +120,14 @@ class MachineModuleInfo : public ImmutablePass { // LandingPads - List of LandingPadInfo describing the landing pad information // in the current function. std::vector LandingPads; - + + // Map of invoke call site index values to associated begin EH_LABEL for + // the current function. + DenseMap CallSiteMap; + + // The current call site index being processed, if any. 0 if none. + unsigned CurCallSite; + // TypeInfos - List of C++ TypeInfo used in the current function. // std::vector TypeInfos; @@ -157,10 +171,6 @@ public: bool doInitialization(); bool doFinalization(); - /// BeginFunction - Begin gathering function meta information. - /// - void BeginFunction(MachineFunction *) {} - /// EndFunction - Discard function meta information. /// void EndFunction(); @@ -298,7 +308,26 @@ public: const std::vector &getLandingPads() const { return LandingPads; } - + + /// setCallSiteBeginLabel - Map the begin label for a call site + void setCallSiteBeginLabel(unsigned BeginLabel, unsigned Site) { + CallSiteMap[BeginLabel] = Site; + } + + /// getCallSiteBeginLabel - Get the call site number for a begin label + unsigned getCallSiteBeginLabel(unsigned BeginLabel) { + assert(CallSiteMap.count(BeginLabel) && + "Missing call site number for EH_LABEL!"); + return CallSiteMap[BeginLabel]; + } + + /// setCurrentCallSite - Set the call site currently being processed. + void setCurrentCallSite(unsigned Site) { CurCallSite = Site; } + + /// getCurrentCallSite - Get the call site currently being processed, if any. + /// return zero if none. + unsigned getCurrentCallSite(void) { return CurCallSite; } + /// getTypeInfos - Return a reference to the C++ typeinfo for the current /// function. const std::vector &getTypeInfos() const { -- cgit v1.1