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:
David Blaikie
2014-11-02 08:09:09 +00:00
parent 01d89eee39
commit c28e37e4dd
4 changed files with 10 additions and 8 deletions

View File

@ -827,4 +827,12 @@ void DwarfCompileUnit::addExpr(DIELoc &Die, dwarf::Form Form,
DIEValue *Value = new (DIEValueAllocator) DIEExpr(Expr);
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