summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineModuleInfo.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-10-05 23:26:10 +0000
committerBill Wendling <isanbard@gmail.com>2011-10-05 23:26:10 +0000
commitd3b56cbb7dad6bdaa58a73398080691ef61ec728 (patch)
tree27198104eea9b7e14a284429dd1b2d79f64c5b3a /include/llvm/CodeGen/MachineModuleInfo.h
parent4413b509e8b9c376e91e90354924ff353cb4f7c3 (diff)
downloadllvm-d3b56cbb7dad6bdaa58a73398080691ef61ec728.tar.gz
llvm-d3b56cbb7dad6bdaa58a73398080691ef61ec728.tar.bz2
llvm-d3b56cbb7dad6bdaa58a73398080691ef61ec728.tar.xz
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
Diffstat (limited to 'include/llvm/CodeGen/MachineModuleInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index a09a71400d..2bf7f1788f 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<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;