[llvm-commits] [llvm] r80153 - /llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp

Eric Christopher echristo at apple.com
Wed Aug 26 14:44:57 PDT 2009


Author: echristo
Date: Wed Aug 26 16:44:57 2009
New Revision: 80153

URL: http://llvm.org/viewvc/llvm-project?rev=80153&view=rev
Log:
Rework getPersonalityIndex slightly - 0 is now a valid and not-NULL
personality function.

Modified:
    llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp

Modified: llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp?rev=80153&r1=80152&r2=80153&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineModuleInfo.cpp Wed Aug 26 16:44:57 2009
@@ -277,7 +277,7 @@
 }
 
 /// 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 @@
       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;
 }
 





More information about the llvm-commits mailing list