diff options
| author | Amir Ayupov <aaupov@fb.com> | 2024-08-10 23:47:48 -0700 |
|---|---|---|
| committer | Amir Ayupov <aaupov@fb.com> | 2024-08-10 23:47:48 -0700 |
| commit | 6e733cb2ee2f80ce3ca3095f5a9dd1c1d22789d7 (patch) | |
| tree | 5b459e8b7d90af381df39dba6d2d430c6a2e4fa7 /clang/lib/Serialization/ASTWriterDecl.cpp | |
| parent | 732c302187ce0bf0279bbf75f7067cf34bc63cfc (diff) | |
| parent | 242f4e85eb5caa462a9835ac85c49e4a78dc1703 (diff) | |
[𝘀𝗽𝗿] changes introduced through rebaseusers/aaupov/spr/main.mcprofgennfc-expand-auto-for-mcdecodedpseudoprobe
Created using spr 1.3.4
[skip ci]
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
| -rw-r--r-- | clang/lib/Serialization/ASTWriterDecl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp index 17c774038571..8a4ca54349e3 100644 --- a/clang/lib/Serialization/ASTWriterDecl.cpp +++ b/clang/lib/Serialization/ASTWriterDecl.cpp @@ -1529,8 +1529,14 @@ void ASTDeclWriter::VisitCXXRecordDecl(CXXRecordDecl *D) { if (D->isThisDeclarationADefinition()) Record.AddCXXDefinitionData(D); + if (D->isCompleteDefinition() && D->isInNamedModule()) + Writer.AddDeclRef(D, Writer.ModularCodegenDecls); + // Store (what we currently believe to be) the key function to avoid // deserializing every method so we can compute it. + // + // FIXME: Avoid adding the key function if the class is defined in + // module purview since in that case the key function is meaningless. if (D->isCompleteDefinition()) Record.AddDeclRef(Context.getCurrentKeyFunction(D)); |
