From: Jim Laskey Date: Mon, 27 Mar 2006 01:51:47 +0000 (+0000) Subject: Pass llvm/test/Regression/CodeGen/Generic/debug-info.ll. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a8299deab75b9675f46a2ba03ea8a1ba19ffe280;p=oota-llvm.git Pass llvm/test/Regression/CodeGen/Generic/debug-info.ll. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27158 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachineDebugInfo.cpp b/lib/CodeGen/MachineDebugInfo.cpp index 83494ecc656..eb85f27a475 100644 --- a/lib/CodeGen/MachineDebugInfo.cpp +++ b/lib/CodeGen/MachineDebugInfo.cpp @@ -1337,6 +1337,13 @@ bool DIVerifier::Verify(GlobalVariable *GV) { // Assume validity for the time being (recursion.) ValiditySlot = Valid; + + // Make sure the global is internal or link once (anchor.) + if (GV->getLinkage() != GlobalValue::InternalLinkage && + GV->getLinkage() != GlobalValue::LinkOnceLinkage) { + ValiditySlot = Invalid; + return false; + } // Get the Tag unsigned Tag = DebugInfoDesc::TagFromGlobal(GV);