[PATCH] D27589: [DebugInfo] Relax test case for long double constants.

David Gross via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 8 13:10:29 PST 2016


dgross created this revision.
dgross added reviewers: cfe-commits, probinson.

https://reviews.llvm.org/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.


https://reviews.llvm.org/D27589

Files:
  test/CodeGen/debug-info-static-const-fp.c


Index: test/CodeGen/debug-info-static-const-fp.c
===================================================================
--- test/CodeGen/debug-info-static-const-fp.c
+++ test/CodeGen/debug-info-static-const-fp.c
@@ -24,4 +24,8 @@
 // CHECK: !DIGlobalVariable(name: "dVal", {{.*}}, isLocal: true, isDefinition: true, expr: ![[DEXPR:[0-9]+]]
 // CHECK: ![[DEXPR]] = !DIExpression(DW_OP_constu, 4658387303597904457, DW_OP_stack_value)
 
-// CHECK: !DIGlobalVariable(name: "ldVal", {{.*}}, isLocal: true, isDefinition: true)
+// Temporarily removing this check -- for some targets (such as
+// "--target=hexagon-unknown-elf"), long double does not exceed 64
+// bits, and so we actually do get the constant value (expr) emitted.
+//
+// DO-NOT-CHECK: !DIGlobalVariable(name: "ldVal", {{.*}}, isLocal: true, isDefinition: true)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27589.80815.patch
Type: text/x-patch
Size: 820 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161208/5e064d3b/attachment.bin>


More information about the cfe-commits mailing list