[PATCH] D45124: [CodeGen] Record if a C++ record is trivial type when emitting Codeview

Aaron Smith via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 31 08:28:28 PDT 2018


asmith created this revision.
asmith added reviewers: rnk, zturner, llvm-commits.
Herald added a subscriber: cfe-commits.

This has a dependence on https://reviews.llvm.org/D45122


Repository:
  rC Clang

https://reviews.llvm.org/D45124

Files:
  CodeGen/CGDebugInfo.cpp


Index: CodeGen/CGDebugInfo.cpp
===================================================================
--- CodeGen/CGDebugInfo.cpp
+++ CodeGen/CGDebugInfo.cpp
@@ -2838,6 +2838,12 @@
       Flags |= llvm::DINode::FlagTypePassByReference;
     else
       Flags |= llvm::DINode::FlagTypePassByValue;
+
+    // When emitting codeview, record if a C++ record is trivial type.
+    if (CGM.getCodeGenOpts().EmitCodeView) {
+      if (CXXRD->isTrivial())
+        Flags |= llvm::DINode::FlagTrivial;
+    }
   }
 
   llvm::DICompositeType *RealDecl = DBuilder.createReplaceableCompositeType(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45124.140545.patch
Type: text/x-patch
Size: 582 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180331/feb0b3b3/attachment.bin>


More information about the cfe-commits mailing list