OSDN Git Service

[Verifier] Fix !dbg validation if Scope is the Subprogram
authorKeno Fischer <kfischer@college.harvard.edu>
Sun, 6 Dec 2015 23:05:38 +0000 (23:05 +0000)
committerKeno Fischer <kfischer@college.harvard.edu>
Sun, 6 Dec 2015 23:05:38 +0000 (23:05 +0000)
commit41e546b231af7f317b84d2b342125cea73a1bb46
tree06036a6cd87169b5c564983d4c9b7aba289f977a
parent3b8cbdadafcf6879c1e6544ee8dd8182e6cd4133
[Verifier] Fix !dbg validation if Scope is the Subprogram

Summary:
We are inserting both Scope and SP into the Seen map and check whether
it was already there in which case we skip the validation (the idea
being that we already checked this Subprogram before). However,
if (Scope == SP) as MDNodes, then inserting the Scope, will trigger
the Seen check causing us to incorrectly not validate this !dbg
attachment. Fix this by not performing the SP Seen check if Scope == SP

Reviewers: pcc, dexonsmith, dblaikie

Subscribers: dblaikie, llvm-commits

Differential Revision: http://reviews.llvm.org/D14697

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254887 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Verifier.cpp
test/CodeGen/X86/2010-05-28-Crash.ll
test/Verifier/func-dbg.ll [new file with mode: 0644]