[all-commits] [llvm/llvm-project] 0b90a0: [test][DebugInfo] Adapt two tests for Sun assemble...

rorth via All-commits all-commits at lists.llvm.org
Sat Aug 8 00:14:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0b90a08f7722980f6074c6eada8022242408cdb4
      https://github.com/llvm/llvm-project/commit/0b90a08f7722980f6074c6eada8022242408cdb4
  Author: Rainer Orth <ro at gcc.gnu.org>
  Date:   2020-08-08 (Sat, 08 Aug 2020)

  Changed paths:
    M llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
    M llvm/test/DebugInfo/Generic/array.ll

  Log Message:
  -----------
  [test][DebugInfo] Adapt two tests for Sun assembler syntax on Sparc

Two DebugInfo tests currently `FAIL` on Sparc:

  LLVM :: DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
  LLVM :: DebugInfo/Generic/array.ll

both in a similar way.  E.g.

  : 'RUN: at line 1';   /var/llvm/local-sparcv9-A/bin/llc -O2 /vol/llvm/src/llvm-project/local/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll -o - | /var/llvm/local-sparcv9-A/bin/FileCheck /vol/llvm/src/llvm-project/local/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll

  /vol/llvm/src/llvm-project/local/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll:4:10: error: CHECK: expected string not found in input
  ; CHECK: debug_info,
           ^

On `amd64-pc-solaris2.11`, the corresponding line is

  .section        .debug_info,"", at progbits

while on `sparcv9-sun-solaris2.11` we have only

  .section        .debug_info

This happens because Sparc currently emits `.section` directives using the
style of the Solaris/SPARC assembler (controlled by `SunStyleELFSectionSwitchSyntax`).

This patch takes the easy way out and allows both forms while tightening the
check to only match the `.section` directive.

Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`,
`x86_64-pc-linux-gnu`, and `x86_64-apple-darwin20.0.0`.

Differential Revision: https://reviews.llvm.org/D85414




More information about the All-commits mailing list