[clang] [CIR] Add framework for CIR to LLVM IR lowering (PR #124650)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 28 10:26:23 PST 2025
================
@@ -44,7 +44,7 @@ class CIRGenerator : public clang::ASTConsumer {
const clang::CodeGenOptions &codeGenOpts;
protected:
- std::unique_ptr<mlir::MLIRContext> mlirContext;
+ std::shared_ptr<mlir::MLIRContext> mlirContext;
----------------
erichkeane wrote:
Hmm... I don't think the shared pointer is the way here, we should have one of them own, and the other observe. What are the lifetimes of these two objects? Is there one of these that has a lifetime that is clearly larger than the other that can be the owner, and the other be a reference to it?
@bcardosolopes
https://github.com/llvm/llvm-project/pull/124650
More information about the cfe-commits
mailing list