DebugInfo: Fix ranges+gmlt test case to actually exercise the gmlt situation.
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 6 Aug 2014 18:24:19 +0000 (18:24 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 6 Aug 2014 18:24:19 +0000 (18:24 +0000)
commite7a280ac8651285bc0e1fd78cd5264be96f8e243
tree498ac241e181bc58f3acd3ceb9663ad27d26aa77
parent7911f2db78806ea4cf3b1ab660d3d9880f0f72c6
DebugInfo: Fix ranges+gmlt test case to actually exercise the gmlt situation.

Originally this test case tested the specified behavior (that -gmlt
would not produce DW_AT_ranges and that when no CU DW_AT_ranges were
produced, no debug_ranges section (not even an empty list) would be
produced) but then the ranges emission code was improved not to create
ranges of a single element (instead favoring high_pc/low_pc) and so this
test case no longer exercised the -gmlt portion of the behavior.

This caused me some confusion when reading the comments and trying to
update this test case for future changes to -gmlt. I've made this test
resilient to those changes (by using the {{DW_TAG|NULL}} pattern to
block the end of the attribute search at the end of the CU's attribute
list without mandating that it must (or must not) be followed by another
tag (the future changes to -gmlt should produce no subprograms in this
CU))

Fix the test case to have two functions in distinct sections to force
the use of DW_AT_ranges.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214985 91177308-0d34-0410-b5e6-96231b3b80d8
test/DebugInfo/cu-line-tables.ll