[clang] [CodeGen] Use data layout aware constant folder in CGBuilder (PR #184819)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 5 08:54:18 PST 2026


================
@@ -89,16 +91,20 @@ class CGBuilderTy : public CGBuilderBaseTy {
   }
 
 public:
-  CGBuilderTy(const CodeGenTypeCache &TypeCache, llvm::LLVMContext &C)
-      : CGBuilderBaseTy(C), TypeCache(TypeCache) {}
-  CGBuilderTy(const CodeGenTypeCache &TypeCache, llvm::LLVMContext &C,
-              const llvm::ConstantFolder &F,
+  CGBuilderTy(const CodeGenModule &CGM, llvm::LLVMContext &C)
----------------
nikic wrote:

The explicit LLVMContext argument here is now unnecessary, as it can be derived from CodeGenModule. Kept it for now as this is unrelated to the change itself.

https://github.com/llvm/llvm-project/pull/184819


More information about the cfe-commits mailing list