diff options
author | Eric Christopher <echristo@apple.com> | 2009-08-26 21:44:57 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2009-08-26 21:44:57 +0000 |
commit | e92cc8d5591cb7ded636c91cc98c741af62ec85f (patch) | |
tree | c462c5463088ef9b2f94c6786896240c8e5a2e7f /lib/CodeGen/MachineModuleInfo.cpp | |
parent | 2a1099a6809307eee7521b1f725ef89370f7ebd1 (diff) | |
download | external_llvm-e92cc8d5591cb7ded636c91cc98c741af62ec85f.zip external_llvm-e92cc8d5591cb7ded636c91cc98c741af62ec85f.tar.gz external_llvm-e92cc8d5591cb7ded636c91cc98c741af62ec85f.tar.bz2 |
Rework getPersonalityIndex slightly - 0 is now a valid and not-NULL
personality function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80153 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | lib/CodeGen/MachineModuleInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index 2bd13c0..a673d17 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/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; } |