Commit 2d6c8c3f authored by Tanya Lattner's avatar Tanya Lattner
Browse files

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
parent a6349914
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+7 −2
Original line number Diff line number Diff line
@@ -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,6 +149,11 @@ void MachineModuleInfo::addPersonality(MachineBasicBlock *LandingPad,
    if (Personalities[i] == Personality)
      return;
  
  // 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);
}