mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-22 10:29:35 +00:00
Verifier: !llvm.dbg.cu must point at compile units
Duplicate this check from `verifyDebugInfo()`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233094 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ab10069039
commit
eeb2ba6d46
@ -111,6 +111,13 @@ private:
|
|||||||
OS << '\n';
|
OS << '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Write(const NamedMDNode *NMD) {
|
||||||
|
if (!NMD)
|
||||||
|
return;
|
||||||
|
NMD->print(OS);
|
||||||
|
OS << '\n';
|
||||||
|
}
|
||||||
|
|
||||||
void Write(Type *T) {
|
void Write(Type *T) {
|
||||||
if (!T)
|
if (!T)
|
||||||
return;
|
return;
|
||||||
@ -562,6 +569,10 @@ void Verifier::visitNamedMDNode(const NamedMDNode &NMD) {
|
|||||||
if (!MD)
|
if (!MD)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (NMD.getName() == "llvm.dbg.cu") {
|
||||||
|
Assert(isa<MDCompileUnit>(MD), "invalid compile unit", &NMD, MD);
|
||||||
|
}
|
||||||
|
|
||||||
visitMDNode(*MD);
|
visitMDNode(*MD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user