Revert "Emit DW_AT_object_pointer once, on the declaration, for each function."

Breaks GDB buildbot
(http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/14517)

GCC emits DW_AT_object_pointer /everywhere/ (declaration, abstract
definition, inlined subroutine), but it looks like GCC relies on it
being somewhere other than the declaration, at least. I'll experiment
further & can hopefully still remove it from the inlined_subroutine.

This reverts commit r207705.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207719 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-04-30 22:58:19 +00:00
parent 6c0458d2b4
commit 4e9d8388dd
6 changed files with 14 additions and 48 deletions

View File

@ -1164,8 +1164,7 @@ void DwarfUnit::constructTypeDIE(DIE &Buffer, DIDerivedType DTy) {
}
/// constructSubprogramArguments - Construct function argument DIEs.
DIE *DwarfUnit::constructSubprogramArguments(DIE &Buffer, DIArray Args) {
DIE *ObjectPointer = nullptr;
void DwarfUnit::constructSubprogramArguments(DIE &Buffer, DIArray Args) {
for (unsigned i = 1, N = Args.getNumElements(); i < N; ++i) {
DIDescriptor Ty = Args.getElement(i);
if (Ty.isUnspecifiedParameter()) {
@ -1176,11 +1175,8 @@ DIE *DwarfUnit::constructSubprogramArguments(DIE &Buffer, DIArray Args) {
addType(Arg, DIType(Ty));
if (DIType(Ty).isArtificial())
addFlag(Arg, dwarf::DW_AT_artificial);
if (DIType(Ty).isObjectPointer())
ObjectPointer = &Arg;
}
}
return ObjectPointer;
}
/// constructTypeDIE - Construct type DIE from DICompositeType.
@ -1501,8 +1497,7 @@ DIE *DwarfUnit::getOrCreateSubprogramDIE(DISubprogram SP) {
// Add arguments. Do not add arguments for subprogram definition. They will
// be handled while processing variables.
if (DIE *ObjectPointer = constructSubprogramArguments(SPDie, Args))
addDIEEntry(SPDie, dwarf::DW_AT_object_pointer, *ObjectPointer);
constructSubprogramArguments(SPDie, Args);
}
if (SP.isArtificial())