forked from OSchip/llvm-project
AsmPrinter: Simplify logic for debug info intrinsics' !dbg attachments
These are required, so just assume they're there. llvm-svn: 235138
This commit is contained in:
parent
54fff4c9e2
commit
78a9527062
|
@ -207,10 +207,7 @@ void llvm::calculateDbgValueHistory(const MachineFunction *MF,
|
|||
MDLocalVariable *RawVar = MI.getDebugVariable();
|
||||
assert(RawVar->isValidLocationForIntrinsic(MI.getDebugLoc()) &&
|
||||
"Expected inlined-at fields to agree");
|
||||
MDLocation *IA = nullptr;
|
||||
if (MDLocation *Loc = MI.getDebugLoc())
|
||||
IA = Loc->getInlinedAt();
|
||||
InlinedVariable Var(RawVar, IA);
|
||||
InlinedVariable Var(RawVar, MI.getDebugLoc()->getInlinedAt());
|
||||
|
||||
if (unsigned PrevReg = Result.getRegisterForVar(Var))
|
||||
dropRegDescribedVar(RegVars, PrevReg, Var);
|
||||
|
|
|
@ -711,7 +711,10 @@ void DwarfDebug::collectVariableInfoFromMMITable(
|
|||
for (const auto &VI : MMI->getVariableDbgInfo()) {
|
||||
if (!VI.Var)
|
||||
continue;
|
||||
InlinedVariable Var(VI.Var, VI.Loc ? VI.Loc->getInlinedAt() : nullptr);
|
||||
assert(VI.Var->isValidLocationForIntrinsic(VI.Loc) &&
|
||||
"Expected inlined-at fields to agree");
|
||||
|
||||
InlinedVariable Var(VI.Var, VI.Loc->getInlinedAt());
|
||||
Processed.insert(Var);
|
||||
LexicalScope *Scope = LScopes.findLexicalScope(VI.Loc);
|
||||
|
||||
|
@ -719,8 +722,6 @@ void DwarfDebug::collectVariableInfoFromMMITable(
|
|||
if (!Scope)
|
||||
continue;
|
||||
|
||||
assert(VI.Var->isValidLocationForIntrinsic(VI.Loc) &&
|
||||
"Expected inlined-at fields to agree");
|
||||
DIExpression Expr = cast_or_null<MDExpression>(VI.Expr);
|
||||
ensureAbstractVariableIsCreatedIfScoped(Var, Scope->getScopeNode());
|
||||
auto RegVar =
|
||||
|
|
|
@ -98,13 +98,10 @@ public:
|
|||
/// AbstractVar may be NULL.
|
||||
DbgVariable(const MachineInstr *DbgValue, DwarfDebug *DD)
|
||||
: Var(DbgValue->getDebugVariable()),
|
||||
IA(DbgValue->getDebugLoc() ? DbgValue->getDebugLoc()->getInlinedAt()
|
||||
: nullptr),
|
||||
IA(DbgValue->getDebugLoc()->getInlinedAt()),
|
||||
Expr(1, DbgValue->getDebugExpression()), TheDIE(nullptr),
|
||||
DotDebugLocOffset(~0U), MInsn(DbgValue), DD(DD) {
|
||||
FrameIndex.push_back(~0);
|
||||
if (MDLocation *Loc = DbgValue->getDebugLoc())
|
||||
IA = Loc->getInlinedAt();
|
||||
}
|
||||
|
||||
// Accessors.
|
||||
|
|
Loading…
Reference in New Issue