[DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.
authorAmy Huang <akhuang@google.com>
Tue, 4 Feb 2020 21:20:13 +0000 (13:20 -0800)
committerAmy Huang <akhuang@google.com>
Tue, 7 Apr 2020 16:10:27 +0000 (09:10 -0700)
commitbcf66084eddd4d3dbe78fc4ed39a347d5d8d57d4
tree53cb5ca97bdbf890de9394d795576f780ffebbce
parent259649a51982d0ea6fdbaa62a87e802c9a8a86d2
[DebugInfo] Fix for adding "returns cxx udt" option to functions in CodeView.

Summary:
This change adds DIFlagNonTrivial to forward declarations of
DICompositeType. It adds the flag to nontrivial types and types with
unknown triviality.

It fixes adding the "CxxReturnUdt" flag to functions inconsistently,
since it is added based on whether the return type is marked NonTrivial, and
that changes if the return type was a forward declaration.

continues the discussion at https://reviews.llvm.org/D75215

Bug: https://bugs.llvm.org/show_bug.cgi?id=44785

Reviewers: rnk, dblaikie, aprantl

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77436
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/CodeGenCXX/debug-info-composite-triviality-fwd-decl.cpp [new file with mode: 0644]