OSDN Git Service

DebugInfo: Change DIBuilder to make distinct DIGlobalVariables
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 23 Apr 2016 22:29:09 +0000 (22:29 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 23 Apr 2016 22:29:09 +0000 (22:29 +0000)
commit1e7e2b2b556977af8ccc12b7afba61302f3a2da9
tree1bedf0f0384e0a7fbeedc559b6eb15df27fa8474
parentc24d780619ee223a13ddbd520ecb64d792b8921b
DebugInfo: Change DIBuilder to make distinct DIGlobalVariables

A long overdue change to make DIGlobalVariable distinct.  Much like
DISubprogram definitions (changed in r246098), it isn't logical to
unique DIGlobalVariable definitions from two different compile units.

(Longer-term, we should also find a way to reverse the link between
GlobalVariable and DIGlobalVariable, and between DIGlobalVariable and
DICompileUnit, so that debug info to do with optimized-out globals
disappears.  Admittedly it's harder than with Function/DISubprogram,
since global variables may be constant-folded and the debug info should
still describe that somehow.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267301 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/DIBuilder.cpp