mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
Debug Info Verifier: enable public functions of Finder to update the type map.
We used to depend on running processModule before the other public functions such as processDeclare, processValue and processLocation. We are now relaxing the constraint by adding a module argument to the three functions and letting the three functions to initialize the type map. This will be used in a follow-on patch that collects nodes reachable from a Function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194973 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
+3
-3
@@ -2125,7 +2125,7 @@ void Verifier::visitInstruction(Instruction &I) {
|
||||
|
||||
if (!DisableDebugInfoVerifier) {
|
||||
MD = I.getMetadata(LLVMContext::MD_dbg);
|
||||
Finder.processLocation(DILocation(MD));
|
||||
Finder.processLocation(*Mod, DILocation(MD));
|
||||
}
|
||||
|
||||
InstsInThisBlock.insert(&I);
|
||||
@@ -2303,13 +2303,13 @@ void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
|
||||
Assert1(MD->getNumOperands() == 1,
|
||||
"invalid llvm.dbg.declare intrinsic call 2", &CI);
|
||||
if (!DisableDebugInfoVerifier)
|
||||
Finder.processDeclare(cast<DbgDeclareInst>(&CI));
|
||||
Finder.processDeclare(*Mod, cast<DbgDeclareInst>(&CI));
|
||||
} break;
|
||||
case Intrinsic::dbg_value: { //llvm.dbg.value
|
||||
if (!DisableDebugInfoVerifier) {
|
||||
Assert1(CI.getArgOperand(0) && isa<MDNode>(CI.getArgOperand(0)),
|
||||
"invalid llvm.dbg.value intrinsic call 1", &CI);
|
||||
Finder.processValue(cast<DbgValueInst>(&CI));
|
||||
Finder.processValue(*Mod, cast<DbgValueInst>(&CI));
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user