From: Bill Wendling Date: Wed, 5 Oct 2011 23:26:10 +0000 (+0000) Subject: Add accessor method to check if the landing pad symbol has call site information. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d3b56cbb7dad6bdaa58a73398080691ef61ec728;p=oota-llvm.git Add accessor method to check if the landing pad symbol has call site information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141244 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index a09a71400dd..2bf7f1788f8 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -338,9 +338,17 @@ public: /// getCallSiteLandingPad - Get the call site indexes for a landing pad EH /// symbol. SmallVectorImpl &getCallSiteLandingPad(MCSymbol *Sym) { + assert(hasCallSiteLandingPad(Sym) && + "missing call site number for landing pad!"); return LPadToCallSiteMap[Sym]; } + /// hasCallSiteLandingPad - Return true if the landing pad Eh symbol has an + /// associated call site. + bool hasCallSiteLandingPad(MCSymbol *Sym) { + return !LPadToCallSiteMap[Sym].empty(); + } + /// setCallSiteBeginLabel - Map the begin label for a call site. void setCallSiteBeginLabel(MCSymbol *BeginLabel, unsigned Site) { CallSiteMap[BeginLabel] = Site;