@@ -46,21 +52,124 @@ void CIRGenFunction::emitAutoVarAlloca(const VarDecl &d) {
address = createTempAlloca(allocaTy, alignment, loc, d.getName());
declare(address.getPointer(), &d, ty, getLoc(d.getSourceRange()), alignment);
+ emission.Addr = address;
setAddrOfLocalVar
andykaylor wrote:
Apparently the code formatting checker won't even let me mention "undef" in a
comment.
https://github.com/llvm/llvm-project/pull/130164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/li
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/130164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/130164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -46,21 +52,124 @@ void CIRGenFunction::emitAutoVarAlloca(const VarDecl &d) {
address = createTempAlloca(allocaTy, alignment, loc, d.getName());
declare(address.getPointer(), &d, ty, getLoc(d.getSourceRange()), alignment);
+ emission.Addr = address;
setAddrOfLocalVar
@@ -0,0 +1,322 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
@@ -94,10 +203,59 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) {
assert(d.hasLocalStorage());
- assert(!cir::MissingFeatures::opAllocaVarDeclContext());
+ CIRGenFunction::VarDeclContext varDeclCtx{*this, &d};
return emitAutoVarDecl(d);
}
+void CIRGenFunctio
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/130164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/130164
>From 69c7104391ff9b6ae1dbcb6275a3070da4f8dd02 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Tue, 4 Mar 2025 10:21:24 -0800
Subject: [PATCH 1/2] [CIR] Emit init of local variables
Local variable initializ
@@ -46,21 +52,124 @@ void CIRGenFunction::emitAutoVarAlloca(const VarDecl &d) {
address = createTempAlloca(allocaTy, alignment, loc, d.getName());
declare(address.getPointer(), &d, ty, getLoc(d.getSourceRange()), alignment);
+ emission.Addr = address;
setAddrOfLocalVar
@@ -94,10 +203,59 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) {
assert(d.hasLocalStorage());
- assert(!cir::MissingFeatures::opAllocaVarDeclContext());
+ CIRGenFunction::VarDeclContext varDeclCtx{*this, &d};
return emitAutoVarDecl(d);
}
+void CIRGenFunctio
@@ -46,21 +52,124 @@ void CIRGenFunction::emitAutoVarAlloca(const VarDecl &d) {
address = createTempAlloca(allocaTy, alignment, loc, d.getName());
declare(address.getPointer(), &d, ty, getLoc(d.getSourceRange()), alignment);
+ emission.Addr = address;
setAddrOfLocalVar
@@ -0,0 +1,322 @@
+//===--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/erichkeane commented:
1 comment, but I don't feel comfortable approving this with some of the work,
so I'll count on the CIR reviewers (David, Henrick, Bruno, Nathan, etc) to do
the approval.
https://github.com/llvm/llvm-project/pull/130164
__
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Andy Kaylor (andykaylor)
Changes
Local variable initialization was previously being ignored. This change adds
support for initialization of scalar variables with constant values and
introduces the constant emitter framework.
---
Patch i
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/130164
Local variable initialization was previously being ignored. This change adds
support for initialization of scalar variables with constant values and
introduces the constant emitter framework.
>From 69c71043
16 matches
Mail list logo