[PATCH] D88976: [clang] Use correct address space for global variable debug info

Scott Linder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 9 12:35:21 PDT 2020


scott.linder added inline comments.


================
Comment at: clang/test/CodeGenHIP/debug-info-address-class.hip:8
+
+// CHECK-DAG: ![[FILEVAR0:[0-9]+]] = distinct !DIGlobalVariable(name: "FileVar0", scope: !{{[0-9]+}}, file: !{{[0-9]+}}, line: {{[0-9]+}}, type: !{{[0-9]+}}, isLocal: false, isDefinition: true)
+// CHECK-DAG: !DIGlobalVariableExpression(var: ![[FILEVAR0]], expr: !DIExpression())
----------------
aprantl wrote:
> They are more convenient, but having very many CHECK_DAGs is also really slow — would it be feasible to reorder them and use CHECKs? Perhaps by running clang/FileCheck twice with different sets of CHECK lines?
The test is pretty short, so I just re-ordered the checks to match how they appear in the output (and used more descriptive names to make it easier to follow).

This does mean the test relies on the order these things are traversed. Some bits are maybe a bit surprising, like how the metadata for the `__shared__` auto variable comes before the argument, but I don't imagine it is liable to change often/accidentally.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88976/new/

https://reviews.llvm.org/D88976



More information about the cfe-commits mailing list