summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2009-09-13 19:13:34 +0000
committerTanya Lattner <tonic@nondot.org>2009-09-13 19:13:34 +0000
commit2d6c8c3fc2cdd53165d1d81f4d66c0030b97c52e (patch)
tree9be616fca419e317b67c14a319a7866faabf4bda
parentMerge 80414 from mainline. (diff)
downloadllvm-project-2d6c8c3fc2cdd53165d1d81f4d66c0030b97c52e.tar.gz
llvm-project-2d6c8c3fc2cdd53165d1d81f4d66c0030b97c52e.tar.bz2
llvm-project-2d6c8c3fc2cdd53165d1d81f4d66c0030b97c52e.zip
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. llvm-svn: 81702
-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 5b797aca583c..f285d835e4e4 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -202,7 +202,7 @@ void DwarfException::EmitEHFrame(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) {
bool is4Byte = TD->getPointerSize() == sizeof(int32_t);
Asm->EmitULEB128Bytes(is4Byte ? 4 : 8);
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index df9d7cab0954..3c98b7586ca5 100644
--- a/llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ b/llvm/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.