r354843 - [CGDebugInfo] Set NonTrivial DIFlag to a c++ record if it's not trivial

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 4 07:51:27 PST 2019


Hi Aaron,

I don't see any mention of this in D44406 - so it might have been good to
have a separate review for this (or included this in the review of D44406,
which I think is possible with the monorepo).

Specifically - this change is missing test coverage (there should be a
clang test that goes from C++ source code to LLVM IR & demonstrates the
flag being emitted into the IR, etc).

Also - what's the reason the non-triviality can't be implied by the absence
of the trivial flag? (or the other way around) - the flags seem redundant
with one another.

On Mon, Feb 25, 2019 at 8:02 PM Aaron Smith via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: asmith
> Date: Mon Feb 25 19:49:05 2019
> New Revision: 354843
>
> URL: http://llvm.org/viewvc/llvm-project?rev=354843&view=rev
> Log:
> [CGDebugInfo] Set NonTrivial DIFlag to a c++ record if it's not trivial
>
> This goes with https://reviews.llvm.org/D44406
>
>
> Modified:
>     cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=354843&r1=354842&r2=354843&view=diff
>
> ==============================================================================
> --- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Feb 25 19:49:05 2019
> @@ -3031,6 +3031,8 @@ llvm::DICompositeType *CGDebugInfo::Crea
>      // Record if a C++ record is trivial type.
>      if (CXXRD->isTrivial())
>        Flags |= llvm::DINode::FlagTrivial;
> +    else
> +      Flags |= llvm::DINode::FlagNonTrivial;
>    }
>
>    llvm::DICompositeType *RealDecl =
> DBuilder.createReplaceableCompositeType(
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190304/e646e0c6/attachment.html>


More information about the cfe-commits mailing list