diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-10-04 20:31:56 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-10-04 20:31:56 +0000 |
commit | c56fe5e9bb46503f5d41a1f9d85abc6a3989fc44 (patch) | |
tree | 3c10a3dfec03167c449744f134d681fa0d78bce4 | |
parent | 606c1036449c95608c7bf8a39e6924654e2ba38d (diff) | |
download | bcm5719-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.h | 12 |
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; } |