mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Mark all calls as "could throw", when exceptions are enabled. Emit necessary LP info too. This fixes PR1439
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37311 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1723,7 +1723,9 @@ void MachineModuleInfo::TidyLandingPads() {
|
||||
LandingPadInfo &LandingPad = LandingPads[i];
|
||||
LandingPad.LandingPadLabel = MappedLabel(LandingPad.LandingPadLabel);
|
||||
|
||||
if (!LandingPad.LandingPadLabel) {
|
||||
// Special case: we *should* emit LPs with null LP MBB. This indicates
|
||||
// "rethrow" case.
|
||||
if (!LandingPad.LandingPadLabel && LandingPad.LandingPadBlock) {
|
||||
LandingPads.erase(LandingPads.begin() + i);
|
||||
continue;
|
||||
}
|
||||
@ -1768,9 +1770,15 @@ Function *MachineModuleInfo::getPersonality() const {
|
||||
/// getPersonalityIndex - Return unique index for current personality
|
||||
/// function. NULL personality function should always get zero index.
|
||||
unsigned MachineModuleInfo::getPersonalityIndex() const {
|
||||
const Function* Personality = (!LandingPads.empty() ?
|
||||
LandingPads[0].Personality : NULL);
|
||||
|
||||
const Function* Personality = NULL;
|
||||
|
||||
// Scan landing pads. If there is at least one non-NULL personality - use it.
|
||||
for (unsigned i = 0; i != LandingPads.size(); ++i)
|
||||
if (LandingPads[i].Personality) {
|
||||
Personality = LandingPads[i].Personality;
|
||||
break;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < Personalities.size(); ++i) {
|
||||
if (Personalities[i] == Personality)
|
||||
return i;
|
||||
|
Reference in New Issue
Block a user