Skip to content

Commit

Permalink
Add accessor method to check if the landing pad symbol has call site …
Browse files Browse the repository at this point in the history
…information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141244 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
isanbard committed Oct 5, 2011
1 parent 4413b50 commit d3b56cb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/llvm/CodeGen/MachineModuleInfo.h
Expand Up @@ -338,9 +338,17 @@ class MachineModuleInfo : public ImmutablePass {
/// getCallSiteLandingPad - Get the call site indexes for a landing pad EH
/// symbol.
SmallVectorImpl<unsigned> &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;
Expand Down

0 comments on commit d3b56cb

Please sign in to comment.