diff options
author | Eric Christopher <echristo@apple.com> | 2009-08-26 21:30:49 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2009-08-26 21:30:49 +0000 |
commit | a258c62ea11651cd5b061a08036a81ff7e8a15a6 (patch) | |
tree | c7a785183d5112014821fa7acaf3a59ab4b02653 /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | c2645717cad2ba26fd161fb5848168272a90d20b (diff) | |
download | llvm-a258c62ea11651cd5b061a08036a81ff7e8a15a6.zip llvm-a258c62ea11651cd5b061a08036a81ff7e8a15a6.tar.gz llvm-a258c62ea11651cd5b061a08036a81ff7e8a15a6.tar.bz2 |
If we're emitting additional CIEs due to personality functions
don't emit the default one. Explicitly check for the NULL
CIE later.
llvm-svn: 80146
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineModuleInfo.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index 5a2b746..2bd13c0 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/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. |