From 9233565a0acd9612d37d7ded56f0262a5e5a5392 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Wed, 26 Aug 2009 21:44:57 +0000 Subject: Rework getPersonalityIndex slightly - 0 is now a valid and not-NULL personality function. llvm-svn: 80153 --- llvm/lib/CodeGen/MachineModuleInfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp') diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index 2bd13c0f97e..a673d177fa1 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp @@ -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; } -- cgit v1.2.3