summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2009-08-26 21:30:49 +0000
committerEric Christopher <echristo@apple.com>2009-08-26 21:30:49 +0000
commita258c62ea11651cd5b061a08036a81ff7e8a15a6 (patch)
treec7a785183d5112014821fa7acaf3a59ab4b02653 /llvm/lib/CodeGen
parentc2645717cad2ba26fd161fb5848168272a90d20b (diff)
downloadbcm5719-llvm-a258c62ea11651cd5b061a08036a81ff7e8a15a6.tar.gz
bcm5719-llvm-a258c62ea11651cd5b061a08036a81ff7e8a15a6.zip
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')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp2
-rw-r--r--llvm/lib/CodeGen/MachineModuleInfo.cpp9
2 files changed, 8 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp
index cbd438bc402..170ca241b6a 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -203,7 +203,7 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) {
// If there is a personality and landing pads then point to the language
// specific data area in the exception table.
- if (EHFrameInfo.PersonalityIndex) {
+ if (MMI->getPersonalities()[0] != NULL) {
Asm->EmitULEB128Bytes(4);
Asm->EOL("Augmentation size");
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index 5a2b7466463..2bd13c0f97e 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.
OpenPOWER on IntegriCloud