[llvm] r218041 - Always emit DW_AT_declaration attribute when the variable isn't a definition.

Frédéric Riss friss at apple.com
Thu Sep 18 08:28:16 PDT 2014


> On 18 Sep 2014, at 17:23, David Blaikie <dblaikie at gmail.com> wrote:
> 
> Looks like this might've regressed some debug scenarios:
> 
> http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/17377 <http://lab.llvm.org:8011/builders/clang-x86_64-ubuntu-gdb-75/builds/17377>
> 
> (could be r218040, but it seems like the less likely candidate of the two on the blame list)

I’ve seen it. I sent a mail to the review thread asking for some help from someone that can run the test suite.

Fred

> On Thu, Sep 18, 2014 at 2:38 AM, Frederic Riss <friss at apple.com <mailto:friss at apple.com>> wrote:
> Author: friss
> Date: Thu Sep 18 04:38:23 2014
> New Revision: 218041
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=218041&view=rev <http://llvm.org/viewvc/llvm-project?rev=218041&view=rev>
> Log:
> Always emit DW_AT_declaration attribute when the variable isn't a definition.
> 
> Summary:
> This doesn't show up today as we don't emit decalration only variables. This
> will be tested when the followup patches implementing import of forward
> declared entities lands in clang.
> 
> Reviewers: echristo, dblaikie, aprantl
> 
> Subscribers: llvm-commits
> 
> Differential Revision: http://reviews.llvm.org/D5382 <http://reviews.llvm.org/D5382>
> 
> Modified:
>     llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
> 
> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=218041&r1=218040&r2=218041&view=diff <http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=218041&r1=218040&r2=218041&view=diff>
> ==============================================================================
> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Thu Sep 18 04:38:23 2014
> @@ -1670,6 +1670,9 @@ void DwarfCompileUnit::createGlobalVaria
>        DD->addArangeLabel(SymbolCU(this, Sym));
>        addOpAddress(*Loc, Sym);
>      }
> +    // A static member's declaration is already flagged as such.
> +    if (!SDMDecl.Verify() && !GV.isDefinition())
> +      addFlag(*VariableDIE, dwarf::DW_AT_declaration);
>      // Do not create specification DIE if context is either compile unit
>      // or a subprogram.
>      if (GVContext && GV.isDefinition() && !GVContext.isCompileUnit() &&
> @@ -1678,9 +1681,6 @@ void DwarfCompileUnit::createGlobalVaria
>        VariableSpecDIE = &createAndAddDIE(dwarf::DW_TAG_variable, UnitDie);
>        addDIEEntry(*VariableSpecDIE, dwarf::DW_AT_specification, *VariableDIE);
>        addBlock(*VariableSpecDIE, dwarf::DW_AT_location, Loc);
> -      // A static member's declaration is already flagged as such.
> -      if (!SDMDecl.Verify())
> -        addFlag(*VariableDIE, dwarf::DW_AT_declaration);
>      } else {
>        addBlock(*VariableDIE, dwarf::DW_AT_location, Loc);
>      }
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits <http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140918/32c9ab62/attachment.html>


More information about the llvm-commits mailing list