forked from OSchip/llvm-project
Add method to determine if a begin label has a call site number associated with it.
llvm-svn: 141107
This commit is contained in:
parent
606c103644
commit
c56fe5e9bb
|
@ -329,18 +329,24 @@ public:
|
||||||
return LandingPads;
|
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) {
|
void setCallSiteBeginLabel(MCSymbol *BeginLabel, unsigned Site) {
|
||||||
CallSiteMap[BeginLabel] = 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) {
|
unsigned getCallSiteBeginLabel(MCSymbol *BeginLabel) {
|
||||||
assert(CallSiteMap.count(BeginLabel) &&
|
assert(hasCallSiteBeginLabel(BeginLabel) &&
|
||||||
"Missing call site number for EH_LABEL!");
|
"Missing call site number for EH_LABEL!");
|
||||||
return CallSiteMap[BeginLabel];
|
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.
|
/// setCurrentCallSite - Set the call site currently being processed.
|
||||||
void setCurrentCallSite(unsigned Site) { CurCallSite = Site; }
|
void setCurrentCallSite(unsigned Site) { CurCallSite = Site; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue