mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Sink DwarfUnit::applySubprogramAttributesToDefinition into DwarfCompileUnit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221092 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -827,4 +827,12 @@ void DwarfCompileUnit::addExpr(DIELoc &Die, dwarf::Form Form,
|
|||||||
DIEValue *Value = new (DIEValueAllocator) DIEExpr(Expr);
|
DIEValue *Value = new (DIEValueAllocator) DIEExpr(Expr);
|
||||||
Die.addValue((dwarf::Attribute)0, Form, Value);
|
Die.addValue((dwarf::Attribute)0, Form, Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DwarfCompileUnit::applySubprogramAttributesToDefinition(DISubprogram SP,
|
||||||
|
DIE &SPDie) {
|
||||||
|
DISubprogram SPDecl = SP.getFunctionDeclaration();
|
||||||
|
DIScope Context = resolve(SPDecl ? SPDecl.getContext() : SP.getContext());
|
||||||
|
applySubprogramAttributes(SP, SPDie);
|
||||||
|
addGlobalName(SP.getName(), SPDie, Context);
|
||||||
|
}
|
||||||
} // end llvm namespace
|
} // end llvm namespace
|
||||||
|
@ -214,6 +214,8 @@ public:
|
|||||||
|
|
||||||
/// Add a Dwarf expression attribute data and value.
|
/// Add a Dwarf expression attribute data and value.
|
||||||
void addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr);
|
void addExpr(DIELoc &Die, dwarf::Form Form, const MCExpr *Expr);
|
||||||
|
|
||||||
|
void applySubprogramAttributesToDefinition(DISubprogram SP, DIE &SPDie);
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end llvm namespace
|
} // end llvm namespace
|
||||||
|
@ -1257,13 +1257,6 @@ DIE *DwarfUnit::getOrCreateSubprogramDIE(DISubprogram SP) {
|
|||||||
return &SPDie;
|
return &SPDie;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DwarfUnit::applySubprogramAttributesToDefinition(DISubprogram SP, DIE &SPDie) {
|
|
||||||
DISubprogram SPDecl = SP.getFunctionDeclaration();
|
|
||||||
DIScope Context = resolve(SPDecl ? SPDecl.getContext() : SP.getContext());
|
|
||||||
applySubprogramAttributes(SP, SPDie);
|
|
||||||
addGlobalName(SP.getName(), SPDie, Context);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DwarfUnit::applySubprogramAttributes(DISubprogram SP, DIE &SPDie) {
|
void DwarfUnit::applySubprogramAttributes(DISubprogram SP, DIE &SPDie) {
|
||||||
DIE *DeclDie = nullptr;
|
DIE *DeclDie = nullptr;
|
||||||
StringRef DeclLinkageName;
|
StringRef DeclLinkageName;
|
||||||
|
@ -300,7 +300,6 @@ public:
|
|||||||
DIE *getOrCreateSubprogramDIE(DISubprogram SP);
|
DIE *getOrCreateSubprogramDIE(DISubprogram SP);
|
||||||
|
|
||||||
void applySubprogramAttributes(DISubprogram SP, DIE &SPDie);
|
void applySubprogramAttributes(DISubprogram SP, DIE &SPDie);
|
||||||
void applySubprogramAttributesToDefinition(DISubprogram SP, DIE &SPDie);
|
|
||||||
|
|
||||||
/// getOrCreateTypeDIE - Find existing DIE or create new DIE for the
|
/// getOrCreateTypeDIE - Find existing DIE or create new DIE for the
|
||||||
/// given DIType.
|
/// given DIType.
|
||||||
|
Reference in New Issue
Block a user