diff options
Diffstat (limited to 'lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | lib/CodeGen/MachineModuleInfo.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp index 5a2b746646..2bd13c0f97 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -44,7 +44,7 @@ MachineModuleInfo::MachineModuleInfo() , CallsUnwindInit(0) , DbgInfoAvailable(false) { - // Always emit "no personality" info + // Always emit some info, by default "no personality" info. Personalities.push_back(NULL); } MachineModuleInfo::~MachineModuleInfo() { @@ -148,7 +148,12 @@ void MachineModuleInfo::addPersonality(MachineBasicBlock *LandingPad, if (Personalities[i] == Personality) return; - Personalities.push_back(Personality); + // If this is the first personality we're adding go + // ahead and add it at the beginning. + if (Personalities[0] == NULL) + Personalities[0] = Personality; + else + Personalities.push_back(Personality); } /// addCatchTypeInfo - Provide the catch typeinfo for a landing pad. |