diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-20 07:41:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-20 07:41:15 +0000 |
commit | bcb83e5b6c8e074e73986cb641801ecbedd6e4ed (patch) | |
tree | c74aa7f39d65cfb6369ebee31a7f080d605ba111 /lib/CodeGen/AsmPrinter/DwarfException.cpp | |
parent | 2ab47098f8711f6fa52de9d1a7ce5d9450f41c43 (diff) |
eliminate some uses of AsmPrinter::EmitIntXXX
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfException.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfException.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfException.cpp b/lib/CodeGen/AsmPrinter/DwarfException.cpp index 01c3264774..615be0e1c7 100644 --- a/lib/CodeGen/AsmPrinter/DwarfException.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfException.cpp @@ -119,7 +119,7 @@ void DwarfException::EmitCIE(const Function *PersonalityFn, unsigned Index) { // 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 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) { // 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 @@ void DwarfException::EmitFDE(const FunctionEHFrameInfo &EHFrameInfo) { 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 @@ void DwarfException::EmitExceptionTable() { // 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); |