Pass llvm/test/Regression/CodeGen/Generic/debug-info.ll.

llvm-svn: 27158
This commit is contained in:
Jim Laskey 2006-03-27 01:51:47 +00:00
parent ed728c1291
commit 6e792f9ff8
1 changed files with 7 additions and 0 deletions

View File

@ -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);