Hahnfeld created this revision. Hahnfeld added reviewers: v.g.vassilev, junaire, rjmccall. Herald added a project: All. Hahnfeld requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Its contents are transferred into `DeferredDecls` in `Release()`, so it should be empty in `moveLazyEmissionStates()`. This matches the code downstream in Cling. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D156660 Files: clang/lib/CodeGen/CodeGenModule.cpp Index: clang/lib/CodeGen/CodeGenModule.cpp =================================================================== --- clang/lib/CodeGen/CodeGenModule.cpp +++ clang/lib/CodeGen/CodeGenModule.cpp @@ -7455,6 +7455,8 @@ assert(NewBuilder->DeferredDecls.empty() && "Newly created module should not have deferred decls"); NewBuilder->DeferredDecls = std::move(DeferredDecls); + assert(EmittedDeferredDecls.empty() && + "Still have (unmerged) EmittedDeferredDecls deferred decls"); assert(NewBuilder->DeferredVTables.empty() && "Newly created module should not have deferred vtables"); @@ -7470,10 +7472,5 @@ NewBuilder->TBAA = std::move(TBAA); - assert(NewBuilder->EmittedDeferredDecls.empty() && - "Still have (unmerged) EmittedDeferredDecls deferred decls"); - - NewBuilder->EmittedDeferredDecls = std::move(EmittedDeferredDecls); - NewBuilder->ABI->MangleCtx = std::move(ABI->MangleCtx); }
Index: clang/lib/CodeGen/CodeGenModule.cpp =================================================================== --- clang/lib/CodeGen/CodeGenModule.cpp +++ clang/lib/CodeGen/CodeGenModule.cpp @@ -7455,6 +7455,8 @@ assert(NewBuilder->DeferredDecls.empty() && "Newly created module should not have deferred decls"); NewBuilder->DeferredDecls = std::move(DeferredDecls); + assert(EmittedDeferredDecls.empty() && + "Still have (unmerged) EmittedDeferredDecls deferred decls"); assert(NewBuilder->DeferredVTables.empty() && "Newly created module should not have deferred vtables"); @@ -7470,10 +7472,5 @@ NewBuilder->TBAA = std::move(TBAA); - assert(NewBuilder->EmittedDeferredDecls.empty() && - "Still have (unmerged) EmittedDeferredDecls deferred decls"); - - NewBuilder->EmittedDeferredDecls = std::move(EmittedDeferredDecls); - NewBuilder->ABI->MangleCtx = std::move(ABI->MangleCtx); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits