eliminate the "isEH" argument to EmitSectionOffset.
authorChris Lattner <sabre@nondot.org>
Sun, 4 Apr 2010 21:31:54 +0000 (21:31 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 4 Apr 2010 21:31:54 +0000 (21:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100355 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfException.cpp
lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
lib/CodeGen/AsmPrinter/DwarfPrinter.h

index 5c2bdb1678db8aa815c03386e5e1fc28c8814eae..b29e675afaa6f093a0421a99b5feac0921c32481 100644 (file)
@@ -218,10 +218,10 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) {
                                                   EHFrameInfo.Number));
 
     Asm->OutStreamer.AddComment("FDE CIE offset");
-    EmitSectionOffset(Asm->GetTempSymbol("eh_frame_begin", EHFrameInfo.Number),
-                      Asm->GetTempSymbol("eh_frame_common",
-                                         EHFrameInfo.PersonalityIndex),
-                      true, true);
+    Asm->EmitLabelDifference(
+                       Asm->GetTempSymbol("eh_frame_begin", EHFrameInfo.Number),
+                       Asm->GetTempSymbol("eh_frame_common",
+                                          EHFrameInfo.PersonalityIndex), 4);
 
     MCSymbol *EHFuncBeginSym =
       Asm->GetTempSymbol("eh_func_begin", EHFrameInfo.Number);
@@ -811,7 +811,7 @@ void DwarfException::EmitExceptionTable() {
       // number of 16-byte bundles. The first call site is counted relative to
       // the start of the procedure fragment.
       Asm->OutStreamer.AddComment("Region start");
-      EmitSectionOffset(BeginLabel, EHFuncBeginSym, true, true);
+      Asm->EmitLabelDifference(BeginLabel, EHFuncBeginSym, 4);
       
       Asm->OutStreamer.AddComment("Region length");
       Asm->EmitLabelDifference(EndLabel, BeginLabel, 4);
@@ -823,7 +823,7 @@ void DwarfException::EmitExceptionTable() {
       if (!S.PadLabel)
         Asm->OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/);
       else
-        EmitSectionOffset(S.PadLabel, EHFuncBeginSym, true, true);
+        Asm->EmitLabelDifference(S.PadLabel, EHFuncBeginSym, 4);
 
       // Offset of the first associated action record, relative to the start of
       // the action table. This value is biased by 1 (1 indicates the start of
index b9664190806b345b2ca8753f7662e559ea57a4e9..495e1be58db0bad91af8c79fe6aa3a78a446f862 100644 (file)
@@ -39,13 +39,8 @@ DwarfPrinter::DwarfPrinter(AsmPrinter *A)
 
 
 void DwarfPrinter::EmitSectionOffset(const MCSymbol *Label,
-                                     const MCSymbol *Section,
-                                     bool IsSmall, bool isEH) {
-  bool isAbsolute;
-  if (isEH)
-    isAbsolute = false;
-  else
-    isAbsolute = MAI->isAbsoluteDebugSectionOffsets();
+                                     const MCSymbol *Section, bool IsSmall) {
+  bool isAbsolute = MAI->isAbsoluteDebugSectionOffsets();
 
   if (!isAbsolute)
     return Asm->EmitLabelDifference(Label, Section,
index 1d4bc894ffab8b9e7cd4200628d6137f1206de49..54c4f0c8476ba9486d46b7f62098ad61351cbd3d 100644 (file)
@@ -77,7 +77,7 @@ public:
   /// EmitSectionOffset - Emit Label-Section or use a special purpose directive
   /// to emit a section offset if the target has one.
   void EmitSectionOffset(const MCSymbol *Label, const MCSymbol *Section,
-                         bool IsSmall = false, bool isEH = false);
+                         bool IsSmall = false);
   
   /// EmitFrameMoves - Emit frame instructions to describe the layout of the
   /// frame.