From: Aaron Smith Date: Mon, 23 Jul 2018 20:49:07 +0000 (+0000) Subject: [CodeGen] Record if a C++ record is a trivial type X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7ce68dd9c052f3842479ed8bcdcc44e165663e10;p=clang [CodeGen] Record if a C++ record is a trivial type Summary: This has a dependence on D45122 Reviewers: rnk, zturner, llvm-commits, aleksandr.urakov Reviewed By: rnk Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D45124 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337736 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 10fc22a098..097a1e0430 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -2908,6 +2908,10 @@ llvm::DICompositeType *CGDebugInfo::CreateLimitedType(const RecordType *Ty) { Flags |= llvm::DINode::FlagTypePassByReference; else Flags |= llvm::DINode::FlagTypePassByValue; + + // Record if a C++ record is trivial type. + if (CXXRD->isTrivial()) + Flags |= llvm::DINode::FlagTrivial; } llvm::DICompositeType *RealDecl = DBuilder.createReplaceableCompositeType(