OSDN Git Service

[Verifier] Check parentage of GVs in dbg metadata
authorKeno Fischer <kfischer@college.harvard.edu>
Thu, 14 Jan 2016 22:42:02 +0000 (22:42 +0000)
committerKeno Fischer <kfischer@college.harvard.edu>
Thu, 14 Jan 2016 22:42:02 +0000 (22:42 +0000)
commit508bcbefca7258bb3408f6ad79f56321a28cc296
tree3720cef71440823687f5611420e3f697e95b2bdd
parenta8f3371a07943a1685bafe9b553bebdf7d5a09a0
[Verifier] Check parentage of GVs in dbg metadata

Summary:
Before this the Verifier didn't complain if the GlobalVariable
referenced from a DIGlobalVariable was not in fact in the correct
module (it would crash while writing bitcode though). Fix this by
always checking parantage of GlobalValues while walking constant
expressions and changing the DIGlobalVariable visitor to also
visit the constant it contains.

Reviewers: rafael
Differential Revision: http://reviews.llvm.org/D16059

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257825 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Verifier.cpp
unittests/IR/VerifierTest.cpp