summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Smith <aaron.smith@microsoft.com>2018-07-23 20:49:07 +0000
committerAaron Smith <aaron.smith@microsoft.com>2018-07-23 20:49:07 +0000
commit044326c7fc686b3e5d51a9456a14b5b58f4c11e4 (patch)
treed4ddfa70fb03bdaccb3fbf38fe760c3ce6a9bc4c
parent4345df3dade18e30680108e1b0bd8e88f1c7da2a (diff)
downloadbcm5719-llvm-044326c7fc686b3e5d51a9456a14b5b58f4c11e4.tar.gz
bcm5719-llvm-044326c7fc686b3e5d51a9456a14b5b58f4c11e4.zip
[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 llvm-svn: 337736
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 10fc22a098c..097a1e04304 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/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(
OpenPOWER on IntegriCloud