diff options
author | Jim Laskey <jlaskey@mac.com> | 2006-03-27 01:51:47 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2006-03-27 01:51:47 +0000 |
commit | a8299deab75b9675f46a2ba03ea8a1ba19ffe280 (patch) | |
tree | 9eab6981a5bcf237bed3cabcc8ab1eab9862049d | |
parent | f15485a8d0dff5f720b7ad27346129ac5c3ec503 (diff) |
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
-rw-r--r-- | lib/CodeGen/MachineDebugInfo.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineDebugInfo.cpp b/lib/CodeGen/MachineDebugInfo.cpp index 83494ecc65..eb85f27a47 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); |