Rework getPersonalityIndex slightly - 0 is now a valid and not-NULL

personality function.

llvm-svn: 80153
This commit is contained in:
Eric Christopher 2009-08-26 21:44:57 +00:00
parent 36595c8653
commit 9233565a0a
1 changed files with 3 additions and 3 deletions

View File

@ -277,7 +277,7 @@ Function *MachineModuleInfo::getPersonality() const {
}
/// 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 {
const Function* Personality = NULL;
@ -293,8 +293,8 @@ unsigned MachineModuleInfo::getPersonalityIndex() const {
return i;
}
// This should never happen
llvm_unreachable("Personality function should be set!");
// This will happen if the current personality function is
// in the zero index.
return 0;
}