[cfe-commits] r172591 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CGDebugInfo.h test/CodeGen/2009-10-20-GlobalDebug.c test/CodeGen/debug-info-static.c test/CodeGenCXX/debug-lambda-expressions.cpp

David Blaikie dblaikie at gmail.com
Sat Aug 17 13:10:33 PDT 2013


This patch could've used some more (any) test coverage, btw.

Oh, I see now that the test was added in r172648, but missed at least
the case below


On Tue, Jan 15, 2013 at 5:22 PM, Eric Christopher <echristo at gmail.com> wrote:
> Author: echristo
> Date: Tue Jan 15 19:22:32 2013
> New Revision: 172591
>
> URL: http://llvm.org/viewvc/llvm-project?rev=172591&view=rev
> Log:
> Collect both normal and static data members of a class in source
> order. Describe static data members to metadata using new interfaces.
>
> Part of PR14471.
>
> Patch by Paul Robinson!
[snip]
> +/// CollectRecordStaticField - Helper for CollectRecordFields.
> +void CGDebugInfo::
> +CollectRecordStaticField(const VarDecl *Var,
> +                         SmallVectorImpl<llvm::Value *> &elements,
> +                         llvm::DIType RecordTy) {
> +  // Create the descriptor for the static variable, with or without
> +  // constant initializers.
> +  llvm::DIFile VUnit = getOrCreateFile(Var->getLocation());
> +  llvm::DIType VTy = getOrCreateType(Var->getType(), VUnit);
> +
> +  // Do not describe enums as static members.
> +  if (VTy.getTag() == llvm::dwarf::DW_TAG_enumeration_type)
> +    return;

I changed this to an assert in r188494/r188496, since no test case
actually touched this codepath (I'm sort of surprised none of the
buildbots fired - maybe we really don't have any static member
variables of enum type in all of Clang and LLVM?), which resulted in
PR16927, which I fixed in r188612.



More information about the cfe-commits mailing list