diff options
author | Tanya Lattner <tonic@nondot.org> | 2009-09-13 19:13:34 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2009-09-13 19:13:34 +0000 |
commit | 5d199aacefe79a6239bf2b6d03e9e5521193f02b (patch) | |
tree | 4a4d279f894467afddb369b7fab3034b13eac207 /lib/CodeGen/MachineModuleInfo.cpp | |
parent | 99a127c7317cbe192bab0109d0e489e33bdb8360 (diff) |
Merge 80146 from mainline.
If we're emitting additional CIEs due to personality functions
don't emit the default one. Explicitly check for the NULL
CIE later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_26@81702 91177308-0d34-0410-b5e6-96231b3b80d8
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 df9d7cab09..3c98b7586c 100644 --- a/lib/CodeGen/MachineModuleInfo.cpp +++ b/lib/CodeGen/MachineModuleInfo.cpp @@ -45,7 +45,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() { @@ -149,7 +149,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. |