aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineModuleInfo.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-10-04 20:31:56 +0000
committerBill Wendling <isanbard@gmail.com>2011-10-04 20:31:56 +0000
commit58d3548ea45300275b63403a8fd98543ab22e28c (patch)
treeea5bb139c38631691a747f13304d051445cbbe79 /include/llvm/CodeGen/MachineModuleInfo.h
parentdae7909be3158c44c9bc3d7d33782430b88bea77 (diff)
Add method to determine if a begin label has a call site number associated with it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141107 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineModuleInfo.h')
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index 9e9e11a02c..25eecb5f7c 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -329,18 +329,24 @@ public:
return LandingPads;
}
- /// setCallSiteBeginLabel - Map the begin label for a call site
+ /// setCallSiteBeginLabel - Map the begin label for a call site.
void setCallSiteBeginLabel(MCSymbol *BeginLabel, unsigned Site) {
CallSiteMap[BeginLabel] = Site;
}
- /// getCallSiteBeginLabel - Get the call site number for a begin label
+ /// getCallSiteBeginLabel - Get the call site number for a begin label.
unsigned getCallSiteBeginLabel(MCSymbol *BeginLabel) {
- assert(CallSiteMap.count(BeginLabel) &&
+ assert(hasCallSiteBeginLabel(BeginLabel) &&
"Missing call site number for EH_LABEL!");
return CallSiteMap[BeginLabel];
}
+ /// hasCallSiteBeginLabel - Return true if the begin label has a call site
+ /// number associated with it.
+ bool hasCallSiteBeginLabel(MCSymbol *BeginLabel) {
+ return CallSiteMap[BeginLabel] != 0;
+ }
+
/// setCurrentCallSite - Set the call site currently being processed.
void setCurrentCallSite(unsigned Site) { CurCallSite = Site; }