DIE &SPDie) {
DISubprogram SPDecl = SP.getFunctionDeclaration();
DIScope Context = resolve(SPDecl ? SPDecl.getContext() : SP.getContext());
- applySubprogramAttributes(SP, SPDie);
+ applySubprogramAttributes(SP, SPDie, getCUNode().getEmissionKind() ==
+ DIBuilder::LineTablesOnly);
addGlobalName(SP.getName(), SPDie, Context);
}
} // end llvm namespace
return &SPDie;
}
-void DwarfUnit::applySubprogramAttributes(DISubprogram SP, DIE &SPDie) {
+void DwarfUnit::applySubprogramAttributes(DISubprogram SP, DIE &SPDie,
+ bool Minimal) {
DIE *DeclDie = nullptr;
StringRef DeclLinkageName;
if (DISubprogram SPDecl = SP.getFunctionDeclaration()) {
addString(SPDie, dwarf::DW_AT_name, SP.getName());
// Skip the rest of the attributes under -gmlt to save space.
- if(getCUNode().getEmissionKind() == DIBuilder::LineTablesOnly)
+ if (Minimal)
return;
addSourceLine(SPDie, SP);
/// getOrCreateSubprogramDIE - Create new DIE using SP.
DIE *getOrCreateSubprogramDIE(DISubprogram SP);
- void applySubprogramAttributes(DISubprogram SP, DIE &SPDie);
+ void applySubprogramAttributes(DISubprogram SP, DIE &SPDie,
+ bool Minimal = false);
/// getOrCreateTypeDIE - Find existing DIE or create new DIE for the
/// given DIType.