mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
various cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98426 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
da3e9f760c
commit
206d61e62f
@ -1321,19 +1321,19 @@ DbgScope *DwarfDebug::getOrCreateAbstractScope(MDNode *N) {
|
|||||||
/// If there are global variables in this scope then create and insert
|
/// If there are global variables in this scope then create and insert
|
||||||
/// DIEs for these variables.
|
/// DIEs for these variables.
|
||||||
DIE *DwarfDebug::updateSubprogramScopeDIE(MDNode *SPNode) {
|
DIE *DwarfDebug::updateSubprogramScopeDIE(MDNode *SPNode) {
|
||||||
|
|
||||||
DIE *SPDie = ModuleCU->getDIE(SPNode);
|
DIE *SPDie = ModuleCU->getDIE(SPNode);
|
||||||
assert (SPDie && "Unable to find subprogram DIE!");
|
assert(SPDie && "Unable to find subprogram DIE!");
|
||||||
DISubprogram SP(SPNode);
|
DISubprogram SP(SPNode);
|
||||||
|
|
||||||
// There is not any need to generate specification DIE for a function
|
// There is not any need to generate specification DIE for a function
|
||||||
// defined at compile unit level. If a function is defined inside another
|
// defined at compile unit level. If a function is defined inside another
|
||||||
// function then gdb prefers the definition at top level and but does not
|
// function then gdb prefers the definition at top level and but does not
|
||||||
// expect specification DIE in parent function. So avoid creating
|
// expect specification DIE in parent function. So avoid creating
|
||||||
// specification DIE for a function defined inside a function.
|
// specification DIE for a function defined inside a function.
|
||||||
if (SP.isDefinition() && !SP.getContext().isCompileUnit()
|
if (SP.isDefinition() && !SP.getContext().isCompileUnit() &&
|
||||||
&& !SP.getContext().isFile()
|
!SP.getContext().isFile() && !SP.getContext().isSubprogram()) {
|
||||||
&& !SP.getContext().isSubprogram()) {
|
|
||||||
addUInt(SPDie, dwarf::DW_AT_declaration, dwarf::DW_FORM_flag, 1);
|
addUInt(SPDie, dwarf::DW_AT_declaration, dwarf::DW_FORM_flag, 1);
|
||||||
|
|
||||||
// Add arguments.
|
// Add arguments.
|
||||||
DICompositeType SPTy = SP.getType();
|
DICompositeType SPTy = SP.getType();
|
||||||
DIArray Args = SPTy.getTypeArray();
|
DIArray Args = SPTy.getTypeArray();
|
||||||
@ -2217,7 +2217,7 @@ MCSymbol *DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, MDNode *S) {
|
|||||||
Dir = DB.getDirectory();
|
Dir = DB.getDirectory();
|
||||||
Fn = DB.getFilename();
|
Fn = DB.getFilename();
|
||||||
} else
|
} else
|
||||||
assert (0 && "Unexpected scope info");
|
assert(0 && "Unexpected scope info");
|
||||||
|
|
||||||
unsigned Src = GetOrCreateSourceID(Dir, Fn);
|
unsigned Src = GetOrCreateSourceID(Dir, Fn);
|
||||||
unsigned ID = MMI->NextLabelID();
|
unsigned ID = MMI->NextLabelID();
|
||||||
@ -2733,8 +2733,8 @@ void DwarfDebug::emitCommonDebugFrame() {
|
|||||||
|
|
||||||
/// emitFunctionDebugFrame - Emit per function frame info into a debug frame
|
/// emitFunctionDebugFrame - Emit per function frame info into a debug frame
|
||||||
/// section.
|
/// section.
|
||||||
void
|
void DwarfDebug::
|
||||||
DwarfDebug::emitFunctionDebugFrame(const FunctionDebugFrameInfo&DebugFrameInfo){
|
emitFunctionDebugFrame(const FunctionDebugFrameInfo &DebugFrameInfo) {
|
||||||
if (!MAI->doesDwarfRequireFrameSection())
|
if (!MAI->doesDwarfRequireFrameSection())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -2743,11 +2743,13 @@ DwarfDebug::emitFunctionDebugFrame(const FunctionDebugFrameInfo&DebugFrameInfo){
|
|||||||
Asm->getObjFileLowering().getDwarfFrameSection());
|
Asm->getObjFileLowering().getDwarfFrameSection());
|
||||||
|
|
||||||
Asm->OutStreamer.AddComment("Length of Frame Information Entry");
|
Asm->OutStreamer.AddComment("Length of Frame Information Entry");
|
||||||
EmitDifference(getDWLabel("debug_frame_end", DebugFrameInfo.Number),
|
MCSymbol *DebugFrameBegin =
|
||||||
getDWLabel("debug_frame_begin", DebugFrameInfo.Number), true);
|
getDWLabel("debug_frame_begin", DebugFrameInfo.Number);
|
||||||
|
MCSymbol *DebugFrameEnd =
|
||||||
|
getDWLabel("debug_frame_end", DebugFrameInfo.Number);
|
||||||
|
EmitDifference(DebugFrameEnd, DebugFrameBegin, true);
|
||||||
|
|
||||||
Asm->OutStreamer.EmitLabel(getDWLabel("debug_frame_begin",
|
Asm->OutStreamer.EmitLabel(DebugFrameBegin);
|
||||||
DebugFrameInfo.Number));
|
|
||||||
|
|
||||||
Asm->OutStreamer.AddComment("FDE CIE offset");
|
Asm->OutStreamer.AddComment("FDE CIE offset");
|
||||||
EmitSectionOffset(getTempLabel("debug_frame_common"),
|
EmitSectionOffset(getTempLabel("debug_frame_common"),
|
||||||
@ -2768,8 +2770,7 @@ DwarfDebug::emitFunctionDebugFrame(const FunctionDebugFrameInfo&DebugFrameInfo){
|
|||||||
false);
|
false);
|
||||||
|
|
||||||
Asm->EmitAlignment(2, 0, 0, false);
|
Asm->EmitAlignment(2, 0, 0, false);
|
||||||
Asm->OutStreamer.EmitLabel(getDWLabel("debug_frame_end",
|
Asm->OutStreamer.EmitLabel(DebugFrameEnd);
|
||||||
DebugFrameInfo.Number));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// emitDebugPubNames - Emit visible names into a debug pubnames section.
|
/// emitDebugPubNames - Emit visible names into a debug pubnames section.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user