@@ -90,3 +90,18 @@ int f3(void) {
// OGCG-NEXT: store i32 3, ptr %[[I_PTR]], align 4
// OGCG-NEXT: %[[I:.*]] = load i32, ptr %[[I_PTR]], align 4
// OGCG-NEXT: ret i32 %[[I]]
+
+// Verify null statement handling.
+void f4(void) {
+ ;
erichkeane wrote:
a
@@ -90,3 +90,18 @@ int f3(void) {
// OGCG-NEXT: store i32 3, ptr %[[I_PTR]], align 4
// OGCG-NEXT: %[[I:.*]] = load i32, ptr %[[I_PTR]], align 4
// OGCG-NEXT: ret i32 %[[I]]
+
+// Verify null statement handling.
+void f4(void) {
+ ;
andykaylor wrote:
Th
https://github.com/erichkeane approved this pull request.
2 nits, else its fine.
https://github.com/llvm/llvm-project/pull/134889
___
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/134889
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/134889
___
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/134889
>From efbec15d42a83cd2f4980418a939a88af7c7b92a Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Tue, 8 Apr 2025 10:01:21 -0700
Subject: [PATCH 1/2] [CIR] Handle NullStmt
The handling for NullStmt was going t
@@ -57,6 +57,7 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s,
switch (s->getStmtClass()) {
case Stmt::BreakStmtClass:
+ case Stmt::NullStmtClass:
erichkeane wrote:
Ah, i missed that it wasn't just the same unreachable. No real reason to
@@ -57,6 +57,7 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s,
switch (s->getStmtClass()) {
case Stmt::BreakStmtClass:
+ case Stmt::NullStmtClass:
andykaylor wrote:
I'm fine with that. Trying to avoid doing multiple things, but this is all
@@ -57,6 +57,7 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s,
switch (s->getStmtClass()) {
case Stmt::BreakStmtClass:
+ case Stmt::NullStmtClass:
andykaylor wrote:
I just looked at classic codegen. It puts NoStmtClass (along with
CXXCatc
@@ -90,3 +90,18 @@ int f3(void) {
// OGCG-NEXT: store i32 3, ptr %[[I_PTR]], align 4
// OGCG-NEXT: %[[I:.*]] = load i32, ptr %[[I_PTR]], align 4
// OGCG-NEXT: ret i32 %[[I]]
+
+// Verify null statement handling.
+void f4(void) {
+ ;
erichkeane wrote:
Th
@@ -57,6 +57,7 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s,
switch (s->getStmtClass()) {
case Stmt::BreakStmtClass:
+ case Stmt::NullStmtClass:
erichkeane wrote:
I'm about 99.9% sure that there is no code that can result in it, barring
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Andy Kaylor (andykaylor)
Changes
The handling for NullStmt was going to an error saying the statement handling
wasn't implemented. It doesn't need any implementation. It is sufficient for
emitSimpleStmt to just return success for that sta
@@ -57,6 +57,7 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s,
switch (s->getStmtClass()) {
case Stmt::BreakStmtClass:
+ case Stmt::NullStmtClass:
andykaylor wrote:
Sure. Do you know what code leads to `NoStmtClass`?
https://github.com/ll
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/134889
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -57,6 +57,7 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s,
switch (s->getStmtClass()) {
case Stmt::BreakStmtClass:
+ case Stmt::NullStmtClass:
erichkeane wrote:
Classic codegen ALSO puts `NoStmtClass` here, might be worth doing 'while
llvmbot wrote:
@llvm/pr-subscribers-clangir
Author: Andy Kaylor (andykaylor)
Changes
The handling for NullStmt was going to an error saying the statement handling
wasn't implemented. It doesn't need any implementation. It is sufficient for
emitSimpleStmt to just return success for that s
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/134889
The handling for NullStmt was going to an error saying the statement handling
wasn't implemented. It doesn't need any implementation. It is sufficient for
emitSimpleStmt to just return success for that state
17 matches
Mail list logo