eliminate some uses of AsmPrinter::EmitIntXXX


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93996 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp
index 01c3264..615be0e 100644
--- a/lib/CodeGen/AsmPrinter/DwarfException.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp
@@ -119,7 +119,7 @@
 
   // EH frame header.
   EmitLabel("eh_frame_common_begin", Index);
-  Asm->EmitInt32((int)0);
+  Asm->OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/);
   Asm->EOL("CIE Identifier Tag");
   Asm->EmitInt8(dwarf::DW_CIE_VERSION);
   Asm->EOL("CIE Version");
@@ -281,7 +281,6 @@
     // If there is a personality and landing pads then point to the language
     // specific data area in the exception table.
     if (MMI->getPersonalities()[0] != NULL) {
-      bool is4Byte = TD->getPointerSize() == sizeof(int32_t);
 
       if (Asm->TM.getLSDAEncoding() != DwarfLSDAEncoding::EightByte) {
         Asm->EmitULEB128Bytes(4);
@@ -290,18 +289,16 @@
         if (EHFrameInfo.hasLandingPads)
           EmitReference("exception", EHFrameInfo.Number, true, true);
         else
-          Asm->EmitInt32((int)0);
+          Asm->OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/);
       } else {
-        Asm->EmitULEB128Bytes(is4Byte ? 4 : 8);
+        Asm->EmitULEB128Bytes(TD->getPointerSize());
         Asm->EOL("Augmentation size");
 
         if (EHFrameInfo.hasLandingPads) {
           EmitReference("exception", EHFrameInfo.Number, true, false);
         } else {
-          if (is4Byte)
-            Asm->EmitInt32((int)0);
-          else
-            Asm->EmitInt64((int)0);
+          Asm->OutStreamer.EmitIntValue(0, TD->getPointerSize(),
+                                        0/*addrspace*/);
         }
       }
 
@@ -885,7 +882,7 @@
       // Offset of the landing pad, counted in 16-byte bundles relative to the
       // @LPStart address.
       if (!S.PadLabel)
-        Asm->EmitInt32(0);
+        Asm->OutStreamer.EmitIntValue(0, 4/*size*/, 0/*addrspace*/);
       else
         EmitSectionOffset("label", "eh_func_begin", S.PadLabel, SubprogramCount,
                           true, true);