[clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (#98138)llvmorg-19.1.2
commit7ba7d8e2f7b6445b60679da826210cdde29eaf8b
authorVassil Vassilev <v.g.vassilev@gmail.com>
Wed, 21 Aug 2024 05:22:31 +0000 (21 07:22 +0200)
committerTobias Hieta <tobias@hieta.se>
Tue, 15 Oct 2024 08:17:37 +0000 (15 10:17 +0200)
tree7d64bb70abe5398f450aacfb938304791f7f94d8
parent689282743d4cada4561eab19fda8c8d805e1ab7e
[clang-repl] [codegen] Reduce the state in TBAA. NFC for static compilation. (#98138)

In incremental compilation clang works with multiple `llvm::Module`s.
Our current approach is to create a CodeGenModule entity for every new
module request (via StartModule). However, some of the state such as the
mangle context needs to be preserved to keep the original semantics in
the ever-growing TU.

Fixes: llvm/llvm-project#95581.

cc: @jeaye
(cherry picked from commit 6c62ad446b2441b78ae524d9e700e351d5a76394)
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CGClass.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/CodeGen/CodeGenModule.h
clang/lib/CodeGen/CodeGenTBAA.cpp
clang/lib/CodeGen/CodeGenTBAA.h
clang/lib/CodeGen/CodeGenTypes.cpp
clang/lib/CodeGen/CodeGenTypes.h
clang/lib/CodeGen/MicrosoftCXXABI.cpp
clang/test/Interpreter/assigment-with-implicit-ctor.cpp [new file with mode: 0644]