[PATCH] D36082: [Cloning] Move distinct GlobalVariable debug info metadata in CloneModule

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 09:46:53 PDT 2017


aprantl added a comment.

IIUC this is because the DIGlobalVariables are currently reachable both through the !dbg attachment on the Global and through the globals: field in the DICompileUnit?
This should be unaffected by you change, but could you, to prevent this from breaking whenever we make changes to the metadata graph in the future, also add a test for an constant global variable that is not attached to any symbol?

  !1 = !DIGlobalVariableExpression(var: !3, expr: !2)
  !2 = !DIExpression(DW_OP_constu, 42, DW_OP_stack_value)
  !3 = !DIGlobalVariable(...)


Repository:
  rL LLVM

https://reviews.llvm.org/D36082





More information about the llvm-commits mailing list