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 <[email protected]> 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.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to