Catch a corner case where adding the padding to the "TType base offset" field
authorBill Wendling <isanbard@gmail.com>
Thu, 25 Feb 2010 23:52:44 +0000 (23:52 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 25 Feb 2010 23:52:44 +0000 (23:52 +0000)
commit86f0d33f85c19af294916eacd175f6b0cd81142f
treed147380a00cbe3457095535a996c27ffae388e9c
parentcf0c9bc16260c8a45f2f01321e368efa9ec679c3
Catch a corner case where adding the padding to the "TType base offset" field
will eliminate the need for padding in the "Call site table length". E.g., if
we have this:

    GCC_except_table1:
    Lexception1:
        .byte   0xff  ## @LPStart Encoding = omit
        .byte   0x9b  ## @TType Encoding = indirect pcrel sdata4
        .byte   0x7f  ## @TType base offset
        .byte   0x03  ## Call site Encoding = udata4
        .byte   0x89  ## Call site table length

with padding of 1. We want to emit the padding like this:

    GCC_except_table1:
    Lexception1:
        .byte   0xff  ## @LPStart Encoding = omit
        .byte   0x9b  ## @TType Encoding = indirect pcrel sdata4
        .byte   0xff  ## @TType base offset
        .space  1,0   ## Padding
        .byte   0x03  ## Call site Encoding = udata4
        .byte   0x89  ## Call site table length

and not with padding on the "Call site table length" entry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97183 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/DwarfException.cpp