aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorVassil Vassilev <v.g.vassilev@gmail.com>2024-08-21 07:22:31 +0200
committerGitHub <noreply@github.com>2024-08-21 07:22:31 +0200
commit6c62ad446b2441b78ae524d9e700e351d5a76394 (patch)
treed4b6b9bafc9aae6bd874dcd6b8b5ae6bf8291210 /clang/lib/CodeGen/CodeGenModule.h
parent341d86dcd3ec4ff3073d5f666564bb2cd38f6142 (diff)
downloadllvm-6c62ad446b2441b78ae524d9e700e351d5a76394.zip
llvm-6c62ad446b2441b78ae524d9e700e351d5a76394.tar.gz
llvm-6c62ad446b2441b78ae524d9e700e351d5a76394.tar.bz2
[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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 284bba8..c58bb88 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -320,7 +320,7 @@ private:
// This should not be moved earlier, since its initialization depends on some
// of the previous reference members being already initialized and also checks
// if TheTargetCodeGenInfo is NULL
- CodeGenTypes Types;
+ std::unique_ptr<CodeGenTypes> Types;
/// Holds information about C++ vtables.
CodeGenVTables VTables;
@@ -776,6 +776,7 @@ public:
bool supportsCOMDAT() const;
void maybeSetTrivialComdat(const Decl &D, llvm::GlobalObject &GO);
+ const ABIInfo &getABIInfo();
CGCXXABI &getCXXABI() const { return *ABI; }
llvm::LLVMContext &getLLVMContext() { return VMContext; }
@@ -783,7 +784,7 @@ public:
const TargetCodeGenInfo &getTargetCodeGenInfo();
- CodeGenTypes &getTypes() { return Types; }
+ CodeGenTypes &getTypes() { return *Types; }
CodeGenVTables &getVTables() { return VTables; }