aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2009-09-16 01:15:44 +0000
committerTanya Lattner <tonic@nondot.org>2009-09-16 01:15:44 +0000
commit1d20c4e51ad24e6747da643afff71d2d0d3e9d91 (patch)
treeeab4675ada1a4c6949dbef3c7fe0f5bdf5f0f6f9
parent15a6377b2927930a13ddf7e359ec190ef6819b1e (diff)
Merge 80153 from mainline.
Rework getPersonalityIndex slightly - 0 is now a valid and not-NULL personality function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_26@81982 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/MachineModuleInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp
index 3c98b7586c..f31435941c 100644
--- a/lib/CodeGen/MachineModuleInfo.cpp
+++ b/lib/CodeGen/MachineModuleInfo.cpp
@@ -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;
}