Landing pad-less eh for PPC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33622 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp
index 9228b3e..565cbce 100644
--- a/lib/Target/PowerPC/PPCRegisterInfo.cpp
+++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp
@@ -756,8 +756,7 @@
   MachineFrameInfo *MFI = MF.getFrameInfo();
   MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
   
-  // Prepare for debug frame info.
-  bool hasDebugInfo = MMI && MMI->hasDebugInfo();
+  // Prepare for frame info.
   unsigned FrameLabelId = 0;
   
   // Scan the prolog, looking for an UPDATE_VRSAVE instruction.  If we find it,
@@ -819,7 +818,7 @@
   unsigned TargetAlign = MF.getTarget().getFrameInfo()->getStackAlignment();
   unsigned MaxAlign = MFI->getMaxAlignment();
 
-  if (hasDebugInfo) {
+  if (MMI) {
     // Mark effective beginning of when frame pointer becomes valid.
     FrameLabelId = MMI->NextLabelID();
     BuildMI(MBB, MBBI, TII.get(PPC::LABEL)).addImm(FrameLabelId);
@@ -870,7 +869,7 @@
     }
   }
   
-  if (hasDebugInfo) {
+  if (MMI) {
     std::vector<MachineMove> &Moves = MMI->getFrameMoves();
     
     if (NegFrameSize) {
diff --git a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
index b54c9e9..0fc8481 100644
--- a/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
+++ b/lib/Target/PowerPC/PPCTargetAsmInfo.cpp
@@ -51,12 +51,14 @@
   PrivateGlobalPrefix = "L";
   ConstantPoolSection = "\t.const\t";
   JumpTableDataSection = ".const";
+  GlobalDirective = "\t.globl\t";
   CStringSection = "\t.cstring";
   StaticCtorsSection = ".mod_init_func";
   StaticDtorsSection = ".mod_term_func";
   UsedDirective = "\t.no_dead_strip\t";
   WeakRefDirective = "\t.weak_reference\t";
   HiddenDirective = "\t.private_extern\t";
+  SupportsExceptionHandling = true;
   
   // In non-PIC modes, emit a special label before jump tables so that the
   // linker can perform more accurate dead code stripping.
diff --git a/lib/Target/TargetAsmInfo.cpp b/lib/Target/TargetAsmInfo.cpp
index 45ea0ee..7ac3950 100644
--- a/lib/Target/TargetAsmInfo.cpp
+++ b/lib/Target/TargetAsmInfo.cpp
@@ -59,6 +59,7 @@
   FourByteConstantSection(0),
   EightByteConstantSection(0),
   SixteenByteConstantSection(0),
+  GlobalDirective(0),
   SetDirective(0),
   LCOMMDirective(0),
   COMMDirective("\t.comm\t"),
@@ -70,6 +71,7 @@
   HasLEB128(false),
   HasDotLoc(false),
   HasDotFile(false),
+  SupportsExceptionHandling(false),
   DwarfRequiresFrameSection(true),
   DwarfAbbrevSection(".debug_abbrev"),
   DwarfInfoSection(".debug_info"),
diff --git a/lib/Target/X86/X86RegisterInfo.cpp b/lib/Target/X86/X86RegisterInfo.cpp
index e6500bc..c49fffc 100644
--- a/lib/Target/X86/X86RegisterInfo.cpp
+++ b/lib/Target/X86/X86RegisterInfo.cpp
@@ -997,8 +997,7 @@
   MachineInstr *MI;
   MachineModuleInfo *MMI = MFI->getMachineModuleInfo();
   
-  // Prepare for debug frame info.
-  bool hasDebugInfo = MMI && MMI->hasDebugInfo();
+  // Prepare for frame info.
   unsigned FrameLabelId = 0;
   
   // Get the number of bytes to allocate from the FrameInfo
@@ -1023,7 +1022,7 @@
     }
   }
 
-  if (hasDebugInfo) {
+  if (MMI) {
     // Mark effective beginning of when frame pointer becomes valid.
     FrameLabelId = MMI->NextLabelID();
     BuildMI(MBB, MBBI, TII.get(X86::LABEL)).addImm(FrameLabelId);
@@ -1053,7 +1052,7 @@
     MBB.insert(MBBI, MI);
   }
 
-  if (hasDebugInfo) {
+  if (MMI) {
     std::vector<MachineMove> &Moves = MMI->getFrameMoves();
     
     if (NumBytes) {