[PATCH] D16209: Teach GlobalOpt not to drop DebugInfo on the floor when it promotes globals to allocas
Jonathan Roelofs via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 15 06:54:41 PST 2016
jroelofs added a comment.
@Dblaikie Not sure if my explanation was clear: I'm trying to convert the DI metadata from the kind that references a global, to the kind that references a local. To do that, I /think/ I need to add the dbg.declare/value to the alloca that gets's created, and delete the one that references the soon-to-be-dead global. Does /that/ seem to you to be something out of the range of things that the DI metadata scheme can cope with?
If not, do you know how to delete the DIGlobalVariable here? I started down this rabbit hole because I've got a bug where the debug info emitted into the asm references the global... which no longer exists, causing the assembler to barf on it.
http://reviews.llvm.org/D16209
More information about the llvm-commits
mailing list