git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219414
91177308-0d34-0410-b5e6-
96231b3b80d8
std::make_move_iterator(Children.end()));
return;
}
std::make_move_iterator(Children.end()));
return;
}
- ScopeDIE = DD->constructLexicalScopeDIE(*this, Scope);
+ ScopeDIE = constructLexicalScopeDIE(Scope);
assert(ScopeDIE && "Scope DIE should not be null.");
}
assert(ScopeDIE && "Scope DIE should not be null.");
}
+// Construct new DW_TAG_lexical_block for this scope and attach
+// DW_AT_low_pc/DW_AT_high_pc labels.
+std::unique_ptr<DIE>
+DwarfCompileUnit::constructLexicalScopeDIE(LexicalScope *Scope) {
+ if (DD->isLexicalScopeDIENull(Scope))
+ return nullptr;
+
+ auto ScopeDIE = make_unique<DIE>(dwarf::DW_TAG_lexical_block);
+ if (Scope->isAbstractScope())
+ return ScopeDIE;
+
+ attachRangesOrLowHighPC(*ScopeDIE, Scope->getRanges());
+
+ return ScopeDIE;
+}
+
/// \brief This scope represents inlined body of a function. Construct
/// DIE to represent this concrete inlined copy of the function.
std::unique_ptr<DIE> constructInlinedScopeDIE(LexicalScope *Scope);
/// \brief This scope represents inlined body of a function. Construct
/// DIE to represent this concrete inlined copy of the function.
std::unique_ptr<DIE> constructInlinedScopeDIE(LexicalScope *Scope);
+
+ /// \brief Construct new DW_TAG_lexical_block for this scope and
+ /// attach DW_AT_low_pc/DW_AT_high_pc labels.
+ std::unique_ptr<DIE> constructLexicalScopeDIE(LexicalScope *Scope);
};
} // end llvm namespace
};
} // end llvm namespace
return !getLabelAfterInsn(Ranges.front().second);
}
return !getLabelAfterInsn(Ranges.front().second);
}
-// Construct new DW_TAG_lexical_block for this scope and attach
-// DW_AT_low_pc/DW_AT_high_pc labels.
-std::unique_ptr<DIE>
-DwarfDebug::constructLexicalScopeDIE(DwarfCompileUnit &TheCU,
- LexicalScope *Scope) {
- if (isLexicalScopeDIENull(Scope))
- return nullptr;
-
- auto ScopeDIE = make_unique<DIE>(dwarf::DW_TAG_lexical_block);
- if (Scope->isAbstractScope())
- return ScopeDIE;
-
- TheCU.attachRangesOrLowHighPC(*ScopeDIE, Scope->getRanges());
-
- return ScopeDIE;
-}
-
static std::unique_ptr<DIE> constructVariableDIE(DwarfCompileUnit &TheCU,
DbgVariable &DV,
const LexicalScope &Scope,
static std::unique_ptr<DIE> constructVariableDIE(DwarfCompileUnit &TheCU,
DbgVariable &DV,
const LexicalScope &Scope,
// FIXME: Sink these functions down into DwarfFile/Dwarf*Unit.
// FIXME: Sink these functions down into DwarfFile/Dwarf*Unit.
- /// \brief Construct new DW_TAG_lexical_block for this scope and
- /// attach DW_AT_low_pc/DW_AT_high_pc labels.
- std::unique_ptr<DIE> constructLexicalScopeDIE(DwarfCompileUnit &TheCU,
- LexicalScope *Scope);
-
/// A helper function to create children of a Scope DIE.
DIE *createScopeChildrenDIE(DwarfCompileUnit &TheCU, LexicalScope *Scope,
SmallVectorImpl<std::unique_ptr<DIE>> &Children,
/// A helper function to create children of a Scope DIE.
DIE *createScopeChildrenDIE(DwarfCompileUnit &TheCU, LexicalScope *Scope,
SmallVectorImpl<std::unique_ptr<DIE>> &Children,