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,"",@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.
Tested on sparcv9-sun-solaris2.11 and amd64-pc-solaris2.11.
Alternatively, one could think about changing the default to the common GNU as
syntax instead to avoid issues like this one. I've a separate patch that goes that route, to be submitted shortly.
Unless you think it's important to verify the name exactly ends with "debug_info" (note that this line doesn't check that the name starts with "debug_info", so could pass with e.g. ".some_random_text_debug_info"), you can just get rid of the ',' instead.
Honestly, I'm not really sure what the point of checking the line is at all... It doesn't prove that the next two lines are in the .debug_info section, because a) the first check doesn't actually check the full section directive to show that it's referring to a section directive, and b) there could be anything, including other section directives between the check and the lines below... Same goes with the other test. I'm not sure if it's worth fixing things further thought...