forked from OSchip/llvm-project
[NFC] Move function definition to cpp file
Signed-off-by: Jun Zhang <jun@junz.org>
This commit is contained in:
parent
6b7eae11f1
commit
1a3a2eec71
|
@ -6973,3 +6973,31 @@ void CodeGenModule::printPostfixForExternalizedDecl(llvm::raw_ostream &OS,
|
|||
OS << getContext().getCUIDHash();
|
||||
}
|
||||
}
|
||||
|
||||
void CodeGenModule::moveLazyEmissionStates(CodeGenModule *NewBuilder) {
|
||||
assert(DeferredDeclsToEmit.empty() &&
|
||||
"Should have emitted all decls deferred to emit.");
|
||||
assert(NewBuilder->DeferredDecls.empty() &&
|
||||
"Newly created module should not have deferred decls");
|
||||
NewBuilder->DeferredDecls = std::move(DeferredDecls);
|
||||
|
||||
assert(NewBuilder->DeferredVTables.empty() &&
|
||||
"Newly created module should not have deferred vtables");
|
||||
NewBuilder->DeferredVTables = std::move(DeferredVTables);
|
||||
|
||||
assert(NewBuilder->MangledDeclNames.empty() &&
|
||||
"Newly created module should not have mangled decl names");
|
||||
assert(NewBuilder->Manglings.empty() &&
|
||||
"Newly created module should not have manglings");
|
||||
NewBuilder->Manglings = std::move(Manglings);
|
||||
|
||||
assert(WeakRefReferences.empty() && "Not all WeakRefRefs have been applied");
|
||||
NewBuilder->WeakRefReferences = std::move(WeakRefReferences);
|
||||
|
||||
NewBuilder->TBAA = std::move(TBAA);
|
||||
|
||||
assert(NewBuilder->EmittedDeferredDecls.empty() &&
|
||||
"Still have (unmerged) EmittedDeferredDecls deferred decls");
|
||||
|
||||
NewBuilder->EmittedDeferredDecls = std::move(EmittedDeferredDecls);
|
||||
}
|
||||
|
|
|
@ -1514,34 +1514,7 @@ public:
|
|||
/// Move some lazily-emitted states to the NewBuilder. This is especially
|
||||
/// essential for the incremental parsing environment like Clang Interpreter,
|
||||
/// because we'll lose all important information after each repl.
|
||||
void moveLazyEmissionStates(CodeGenModule *NewBuilder) {
|
||||
assert(DeferredDeclsToEmit.empty() &&
|
||||
"Should have emitted all decls deferred to emit.");
|
||||
assert(NewBuilder->DeferredDecls.empty() &&
|
||||
"Newly created module should not have deferred decls");
|
||||
NewBuilder->DeferredDecls = std::move(DeferredDecls);
|
||||
|
||||
assert(NewBuilder->DeferredVTables.empty() &&
|
||||
"Newly created module should not have deferred vtables");
|
||||
NewBuilder->DeferredVTables = std::move(DeferredVTables);
|
||||
|
||||
assert(NewBuilder->MangledDeclNames.empty() &&
|
||||
"Newly created module should not have mangled decl names");
|
||||
assert(NewBuilder->Manglings.empty() &&
|
||||
"Newly created module should not have manglings");
|
||||
NewBuilder->Manglings = std::move(Manglings);
|
||||
|
||||
assert(WeakRefReferences.empty() &&
|
||||
"Not all WeakRefRefs have been applied");
|
||||
NewBuilder->WeakRefReferences = std::move(WeakRefReferences);
|
||||
|
||||
NewBuilder->TBAA = std::move(TBAA);
|
||||
|
||||
assert(NewBuilder->EmittedDeferredDecls.empty() &&
|
||||
"Still have (unmerged) EmittedDeferredDecls deferred decls");
|
||||
|
||||
NewBuilder->EmittedDeferredDecls = std::move(EmittedDeferredDecls);
|
||||
}
|
||||
void moveLazyEmissionStates(CodeGenModule *NewBuilder);
|
||||
|
||||
private:
|
||||
llvm::Constant *GetOrCreateLLVMFunction(
|
||||
|
|
Loading…
Reference in New Issue