forked from OSchip/llvm-project
Revert some parts of r196288 that were confusing and untested.
If we figure out why they should be here, let's add some testing of some kind so we can better demonstrate why it's needed. llvm-svn: 219694
This commit is contained in:
parent
27549023b0
commit
e75f963c61
|
@ -1312,14 +1312,8 @@ void DwarfDebug::addScopeVariable(LexicalScope *LS, DbgVariable *Var) {
|
|||
|
||||
// Gather and emit post-function debug information.
|
||||
void DwarfDebug::endFunction(const MachineFunction *MF) {
|
||||
// Every beginFunction(MF) call should be followed by an endFunction(MF) call,
|
||||
// though the beginFunction may not be called at all.
|
||||
// We should handle both cases.
|
||||
if (!CurFn)
|
||||
CurFn = MF;
|
||||
else
|
||||
assert(CurFn == MF);
|
||||
assert(CurFn != nullptr);
|
||||
assert(CurFn == MF &&
|
||||
"endFunction should be called with the same function as beginFunction");
|
||||
|
||||
if (!MMI->hasDebugInfo() || LScopes.empty() ||
|
||||
!FunctionDIs.count(MF->getFunction())) {
|
||||
|
|
Loading…
Reference in New Issue