mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 23:24:59 +00:00
IR: Take advantage of -verify checks for MDExpression
Now that we check `MDExpression` during `-verify` (r232299), make the `DIExpression` wrapper more strict: - remove redundant checks in `DebugInfoVerifier`, - overload `get()` to `cast_or_null<MDExpression>` (superseding `getRaw()`), - stop checking for null in any accessor, and - remove `DIExpression::Verify()` entirely in favour of `MDExpression::isValid()`. There is still some logic in this class, mostly to do with high-level iterators; I'll defer cleaning up those until the rest of the wrappers are similarly strict. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232412 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3078,15 +3078,11 @@ void DebugInfoVerifier::processCallInst(DebugInfoFinder &Finder,
|
||||
case Intrinsic::dbg_declare: {
|
||||
auto *DDI = cast<DbgDeclareInst>(&CI);
|
||||
Finder.processDeclare(*M, DDI);
|
||||
if (auto E = DDI->getExpression())
|
||||
Assert(DIExpression(E).Verify(), "DIExpression does not Verify!", E);
|
||||
break;
|
||||
}
|
||||
case Intrinsic::dbg_value: {
|
||||
auto *DVI = cast<DbgValueInst>(&CI);
|
||||
Finder.processValue(*M, DVI);
|
||||
if (auto E = DVI->getExpression())
|
||||
Assert(DIExpression(E).Verify(), "DIExpression does not Verify!", E);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Reference in New Issue
Block a user