[clang] [CIR] Upstream minimal support for structure types (PR #135105)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 9 17:46:57 PDT 2025
================
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
+// RUN: FileCheck --check-prefix=LLVM --input-file=%t-cir.ll %s
+// 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
+
+// Declaration with an incomplete struct type.
+struct U *p;
+
+// CIR: cir.global external @p = #cir.ptr<null> : !cir.ptr<!cir.struct<struct "U" incomplete>>
----------------
erichkeane wrote:
Could we/can we do a test not in the global scope, that is, a pointer to incomplete struct at function scope? Or as function parameters?
Perhaps a 'union' test of both of these as well?
https://github.com/llvm/llvm-project/pull/135105
More information about the cfe-commits
mailing list