diff options
| author | Aaron Smith <aaron.smith@microsoft.com> | 2019-04-11 20:24:54 +0000 |
|---|---|---|
| committer | Aaron Smith <aaron.smith@microsoft.com> | 2019-04-11 20:24:54 +0000 |
| commit | fa7745be7a9800519fe0920c058dd331959f6a6e (patch) | |
| tree | fff21c71ecb8bc216d11ea179870ec459c7312ae /clang/lib/CodeGen | |
| parent | 68a5d619a4088f1561621542ff2186df65119568 (diff) | |
| download | bcm5719-llvm-fa7745be7a9800519fe0920c058dd331959f6a6e.tar.gz bcm5719-llvm-fa7745be7a9800519fe0920c058dd331959f6a6e.zip | |
[DebugInfo] Combine Trivial and NonTrivial flags
Summary:
These flags are used when emitting debug info and needed to initialize subprogram and member function attributes (function options) for Codeview. These function options are used to create an accurate compiler type for UDT symbols (class/struct/union) from PDBs.
The Trivial flag was introduced in https://reviews.llvm.org/D45122
It's been pointed out that Trivial and NonTrivial may imply each other and that seems to be the case in the current tests. This change combines them into a single flag -- NonTrivial -- and updates the corresponding unit tests. There is an additional change to llvm to update the flags.
Reviewers: rnk, zturner, dblaikie, probinson, Hui
Reviewed By: dblaikie
Subscribers: aprantl, jdoerfert, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D59347
llvm-svn: 358219
Diffstat (limited to 'clang/lib/CodeGen')
| -rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index a982ef89396..ff48566af28 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -3034,10 +3034,8 @@ llvm::DICompositeType *CGDebugInfo::CreateLimitedType(const RecordType *Ty) { else Flags |= llvm::DINode::FlagTypePassByValue; - // Record if a C++ record is trivial type. - if (CXXRD->isTrivial()) - Flags |= llvm::DINode::FlagTrivial; - else + // Record if a C++ record is non-trivial type. + if (!CXXRD->isTrivial()) Flags |= llvm::DINode::FlagNonTrivial; } |

