mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Rework getPersonalityIndex slightly - 0 is now a valid and not-NULL
personality function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80153 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a626e16b38
commit
5e365e23f1
@ -277,7 +277,7 @@ Function *MachineModuleInfo::getPersonality() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// getPersonalityIndex - Return unique index for current personality
|
/// getPersonalityIndex - Return unique index for current personality
|
||||||
/// function. NULL personality function should always get zero index.
|
/// function. NULL/first personality function should always get zero index.
|
||||||
unsigned MachineModuleInfo::getPersonalityIndex() const {
|
unsigned MachineModuleInfo::getPersonalityIndex() const {
|
||||||
const Function* Personality = NULL;
|
const Function* Personality = NULL;
|
||||||
|
|
||||||
@ -293,8 +293,8 @@ unsigned MachineModuleInfo::getPersonalityIndex() const {
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This should never happen
|
// This will happen if the current personality function is
|
||||||
llvm_unreachable("Personality function should be set!");
|
// in the zero index.
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user