Commit Graph

10 Commits

Author SHA1 Message Date
Adrian Prantl 9e83fb0838 Adapt testcases to LLVM change r312144 in DIGlobalVariableExpression
llvm-svn: 312148
2017-08-30 18:22:23 +00:00
Reid Kleckner 6d353348e5 Parse and print DIExpressions inline to ease IR and MIR testing
Summary:
Most DIExpressions are empty or very simple. When they are complex, they
tend to be unique, so checking them inline is reasonable.

This also avoids the need for CodeGen passes to append to the
llvm.dbg.mir named md node.

See also PR22780, for making DIExpression not be an MDNode.

Reviewers: aprantl, dexonsmith, dblaikie

Subscribers: qcolombet, javed.absar, eraman, hiraditya, llvm-commits

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

llvm-svn: 311594
2017-08-23 20:31:27 +00:00
Adrian Prantl 5f4740d3e5 Update for LLVM global variable debug info API change.
This reapplies r289921.

llvm-svn: 290155
2016-12-20 02:10:02 +00:00
Adrian Prantl e34d9bc8af Revert "Update for LLVM global variable debug info API change."
This reverts commit r289921.

llvm-svn: 289984
2016-12-16 19:39:18 +00:00
Adrian Prantl db4c86f953 Update for LLVM global variable debug info API change.
llvm-svn: 289921
2016-12-16 04:26:15 +00:00
Adrian Prantl ed4eb86531 Revert "Update for LLVM global variable debug info API change."
This reverts commit 289901 while investigating bot breakage.

llvm-svn: 289908
2016-12-16 01:01:40 +00:00
Adrian Prantl 35bbcefb4b Update for LLVM global variable debug info API change.
llvm-svn: 289901
2016-12-16 00:35:42 +00:00
David Gross ff06759ffb [DebugInfo] Restore test case for long double constants.
Summary:
D27549 (partial fix for PR26619) emits a constant value in the debug
metadata for a floating-point static const that does not exceed 64
bits in size.  Whether or not a long double exceeds 64 bits in size
depends on the target.  Modify the test case so that it expects a
constant value for long double if and only if the long double is no
larger than 64 bits.

Reviewers: cfe-commits, probinson

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

llvm-svn: 289686
2016-12-14 18:52:33 +00:00
David Gross bcc6cea748 [DebugInfo] Relax test case for long double constants.
Summary:
D27549 (partial fix for PR26619) emits a constant value in the debug
metadata for a floating-point static const that does not exceed 64
bits in size.  The regression test accompanying that fix assumes that
a long double exceeds 64 bits in size and hence does not get a
constant value in the debug metadata.  However, for some targets --
such as "--target=hexagon-unknown-elf" -- a long double does not
exceed 64 bits in size, and hence the test fails.

As a temporary fix, modify the regression test to no longer inspect
the debug metadata for a long double.

Reviewers: cfe-commits, probinson

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

llvm-svn: 289103
2016-12-08 21:15:17 +00:00
David Gross 1118d591dc [DebugInfo] Add support for __fp16, float, and double constants.
Summary:
Partial fix for PR26619.

Prior to this change, a DIGlobalVariable corresponding to a static
const was marked with an expression corresponding to its constant
value only if it is of integral type.  With this change, we now do the
same if it is of __fp16, float, or double type (that is,
floating-point types that do not exceed 64 bits in size, and hence are
supported easily by the existing LLVM machinery for creating constant
expressions in debug info).

Reviewers: llvm-commits

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

llvm-svn: 289094
2016-12-08 20:02:46 +00:00