[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-24 Thread Iris Shi via cfe-commits
@@ -13,20 +13,76 @@ #include "CIRGenCall.h" #include "CIRGenFunction.h" +#include "CIRGenFunctionInfo.h" #include "clang/CIR/MissingFeatures.h" using namespace clang; using namespace clang::CIRGen; -CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType)

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-24 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/136854 >From fd1d37ebf0f1c4a23f573444f30730b0f65630bf Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Wed, 23 Apr 2025 20:23:09 +0800 Subject: [PATCH 1/2] [CIR] Cleanup support for C functions --- clang/lib/

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-24 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/136854 >From fd1d37ebf0f1c4a23f573444f30730b0f65630bf Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Wed, 23 Apr 2025 20:23:09 +0800 Subject: [PATCH 1/2] [CIR] Cleanup support for C functions --- clang/lib/

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-24 Thread Iris Shi via cfe-commits
@@ -233,6 +233,19 @@ int f8(int *p) { // OGCG: %[[P2:.*]] = load ptr, ptr %[[P_PTR]], align 8 // OGCG: %[[STAR_P:.*]] = load i32, ptr %[[P2]], align 4 + +void f9() {} el-ev wrote: I'm actually unsure what kind of new tests would be appropriate. Do you ha

[clang] [CIR] Upstream initial support for union type (PR #137501)

2025-04-27 Thread Iris Shi via cfe-commits
https://github.com/el-ev created https://github.com/llvm/llvm-project/pull/137501 Closes #136059 >From f27d8d2f2ecbf65479601f1d21206b1cb4d9ef6a Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Sun, 27 Apr 2025 15:16:19 +0800 Subject: [PATCH] [CIR] Upstream initial support for union t

[clang] [CIR] Upstream initial support for union type (PR #137501)

2025-04-27 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/137501 >From b8011997fdc2548be80dd9305d758466a66cee4c Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Sun, 27 Apr 2025 15:16:19 +0800 Subject: [PATCH] [CIR] Upstream initial support for union type --- .../in

[clang] [CIR] Upstream initial support for union type (PR #137501)

2025-04-29 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/137501 >From b8011997fdc2548be80dd9305d758466a66cee4c Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Sun, 27 Apr 2025 15:16:19 +0800 Subject: [PATCH 1/2] [CIR] Upstream initial support for union type --- ..

[clang] [CIR] Upstream initial support for union type (PR #137501)

2025-04-29 Thread Iris Shi via cfe-commits
@@ -5,25 +5,146 @@ // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll // RUN: FileCheck --check-prefix=OGCG --input-file=%t.ll %s +union U1 { el-ev wrote: Padded and packed unions are added, `CIRGenTypes::isZeroInitializable` doesn't

[clang] [CIR] Upstream initial support for union type (PR #137501)

2025-04-29 Thread Iris Shi via cfe-commits
@@ -306,3 +320,71 @@ CIRGenTypes::computeRecordLayout(const RecordDecl *rd, cir::RecordType *ty) { // TODO: implement verification return rl; } + +void CIRRecordLowering::lowerUnion() { + CharUnits layoutSize = astRecordLayout.getSize(); + mlir::Type storageType = nullpt

[clang] [CIR] Upstream initial support for union type (PR #137501)

2025-04-29 Thread Iris Shi via cfe-commits
@@ -306,3 +320,71 @@ CIRGenTypes::computeRecordLayout(const RecordDecl *rd, cir::RecordType *ty) { // TODO: implement verification return rl; } + +void CIRRecordLowering::lowerUnion() { + CharUnits layoutSize = astRecordLayout.getSize(); + mlir::Type storageType = nullpt

[clang] [CIR] Upstream initial support for union type (PR #137501)

2025-04-29 Thread Iris Shi via cfe-commits
@@ -306,3 +320,71 @@ CIRGenTypes::computeRecordLayout(const RecordDecl *rd, cir::RecordType *ty) { // TODO: implement verification return rl; } + +void CIRRecordLowering::lowerUnion() { + CharUnits layoutSize = astRecordLayout.getSize(); + mlir::Type storageType = nullpt

[clang] [CIR] Upstream initial support for union type (PR #137501)

2025-04-29 Thread Iris Shi via cfe-commits
@@ -306,3 +320,71 @@ CIRGenTypes::computeRecordLayout(const RecordDecl *rd, cir::RecordType *ty) { // TODO: implement verification return rl; } + +void CIRRecordLowering::lowerUnion() { + CharUnits layoutSize = astRecordLayout.getSize(); + mlir::Type storageType = nullpt

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-29 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/136854 >From fd1d37ebf0f1c4a23f573444f30730b0f65630bf Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Wed, 23 Apr 2025 20:23:09 +0800 Subject: [PATCH 1/2] [CIR] Cleanup support for C functions --- clang/lib/

[clang] [clang] ownership_returns attribute takes no more than 2 arguments (PR #137897)

2025-04-30 Thread Iris Shi via cfe-commits
https://github.com/el-ev approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] ownership_returns attribute takes no more than 2 arguments (PR #137897)

2025-04-30 Thread Iris Shi via cfe-commits
el-ev wrote: ### Merge activity * **Apr 30, 7:27 AM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/137897). https://github.com/llvm/llvm-project/pull/137897 __

[clang] [clang] ownership_returns attribute takes no more than 2 arguments (PR #137897)

2025-04-30 Thread Iris Shi via cfe-commits
https://github.com/el-ev closed https://github.com/llvm/llvm-project/pull/137897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for union type (PR #137501)

2025-04-30 Thread Iris Shi via cfe-commits
https://github.com/el-ev closed https://github.com/llvm/llvm-project/pull/137501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-24 Thread Iris Shi via cfe-commits
@@ -47,18 +98,51 @@ class CIRGenFunctionInfo final // This function has to be CamelCase because llvm::FoldingSet requires so. // NOLINTNEXTLINE(readability-identifier-naming) - static void Profile(llvm::FoldingSetNodeID &id, CanQualType resultType) { + static void Profil

[clang] [CIR] Cleanup support for C functions (PR #136854)

2025-04-24 Thread Iris Shi via cfe-commits
https://github.com/el-ev updated https://github.com/llvm/llvm-project/pull/136854 >From fd1d37ebf0f1c4a23f573444f30730b0f65630bf Mon Sep 17 00:00:00 2001 From: Iris Shi <0...@owo.li> Date: Wed, 23 Apr 2025 20:23:09 +0800 Subject: [PATCH 1/2] [CIR] Cleanup support for C functions --- clang/lib/