Skip to content

Commit 49a9f7f

Browse files
committed
Merge 80153 from mainline.
Rework getPersonalityIndex slightly - 0 is now a valid and not-NULL personality function. llvm-svn: 81982
1 parent 3eb9382 commit 49a9f7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/CodeGen/MachineModuleInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ Function *MachineModuleInfo::getPersonality() const {
278278
}
279279

280280
/// getPersonalityIndex - Return unique index for current personality
281-
/// function. NULL personality function should always get zero index.
281+
/// function. NULL/first personality function should always get zero index.
282282
unsigned MachineModuleInfo::getPersonalityIndex() const {
283283
const Function* Personality = NULL;
284284

@@ -294,8 +294,8 @@ unsigned MachineModuleInfo::getPersonalityIndex() const {
294294
return i;
295295
}
296296

297-
// This should never happen
298-
llvm_unreachable("Personality function should be set!");
297+
// This will happen if the current personality function is
298+
// in the zero index.
299299
return 0;
300300
}
301301

0 commit comments

Comments
 (0)