summaryrefslogtreecommitdiffstats
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
commitc56fe5e9bb46503f5d41a1f9d85abc6a3989fc44 (patch)
tree3c10a3dfec03167c449744f134d681fa0d78bce4
parent606c1036449c95608c7bf8a39e6924654e2ba38d (diff)
downloadbcm5719-llvm-c56fe5e9bb46503f5d41a1f9d85abc6a3989fc44.tar.gz
bcm5719-llvm-c56fe5e9bb46503f5d41a1f9d85abc6a3989fc44.zip
Add method to determine if a begin label has a call site number associated with it.
llvm-svn: 141107
-rw-r--r--llvm/include/llvm/CodeGen/MachineModuleInfo.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineModuleInfo.h b/llvm/include/llvm/CodeGen/MachineModuleInfo.h
index 9e9e11a02c3..25eecb5f7c4 100644
--- a/llvm/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/llvm/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; }
OpenPOWER on IntegriCloud