]> granicus.if.org Git - clang/commit
DebugInfo: Correctly describe the lexical decl context of static member variable...
authorDavid Blaikie <dblaikie@gmail.com>
Thu, 23 Oct 2014 16:39:49 +0000 (16:39 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Thu, 23 Oct 2014 16:39:49 +0000 (16:39 +0000)
commitc7fcc109745a5bb0756c1c6159d1f4e0fa296737
tree0a4aecc8ce257d726287a479cbcb14cda16c8206
parente304ebcf47b1b1afeccd0ab5623eb78fe0fb83a0
DebugInfo: Correctly describe the lexical decl context of static member variable definitions.

The previous IR representation used the non-lexical decl context, which
placed the definitions in the same scope as the declarations (ie: within
the class) - this was hidden by the fact that LLVM currently doesn't
respect the context of global variable definitions at all, and always
puts them at the top level (as direct children of the compile_unit).
Having the correct lexical scope improves source fidelity and simplify
backend global variable emission (with changes coming shortly).

Doing something similar for non-member global variables would help
simplify/cleanup things further (see FIXME in the commit) and provide
similar source fidelity benefits to the final debug info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220488 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGDebugInfo.cpp
test/CodeGenCXX/debug-info-static-member.cpp