Commit 49a9f7ff authored by Tanya Lattner's avatar Tanya Lattner
Browse files

Merge 80153 from mainline.

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

llvm-svn: 81982
parent 3eb9382b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -278,7 +278,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;
  
@@ -294,8 +294,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;
}