diff options
author | Adrian Prantl <aprantl@apple.com> | 2016-04-26 21:58:18 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2016-04-26 21:58:18 +0000 |
commit | 88d7917970e98609943d68dc1c47712104dfcb92 (patch) | |
tree | 65589e8fd9cacfb9cff5c54a25d8b5fd2703806b /clang/lib/CodeGen/CGDebugInfo.cpp | |
parent | a3060c1159ffb3a86daa613024ae47fd2fafcb05 (diff) | |
download | bcm5719-llvm-88d7917970e98609943d68dc1c47712104dfcb92.tar.gz bcm5719-llvm-88d7917970e98609943d68dc1c47712104dfcb92.zip |
Module debugging: Use the definition to determine module-defined types.
Follow-up to r267464. Thanks to Richard Smith for pointing this out!
llvm-svn: 267611
Diffstat (limited to 'clang/lib/CodeGen/CGDebugInfo.cpp')
-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 0050b78f04b..e275f060dfd 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1516,9 +1516,7 @@ static bool hasExplicitMemberDefinition(CXXRecordDecl::method_iterator I, /// Does a type definition exist in an imported clang module? static bool isDefinedInClangModule(const RecordDecl *RD) { - if (!RD->isFromASTFile()) - return false; - if (!RD->getDefinition()) + if (!RD || !RD->isFromASTFile()) return false; if (!RD->isExternallyVisible() && RD->getName().empty()) return false; @@ -1535,7 +1533,7 @@ static bool isDefinedInClangModule(const RecordDecl *RD) { static bool shouldOmitDefinition(codegenoptions::DebugInfoKind DebugKind, bool DebugTypeExtRefs, const RecordDecl *RD, const LangOptions &LangOpts) { - if (DebugTypeExtRefs && isDefinedInClangModule(RD)) + if (DebugTypeExtRefs && isDefinedInClangModule(RD->getDefinition())) return true; if (DebugKind > codegenoptions::LimitedDebugInfo) |