================ @@ -0,0 +1,38 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll +// RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o %t.ll +// RUN: FileCheck --input-file=%t.ll %s --check-prefix=OGCG + +typedef unsigned long size_t; ---------------- andykaylor wrote:
I see classic codegen has a few tests for this (`clang/test/CodeGen/object-size.c`, `clang/test/CodeGen/object-size.cpp`, and `clang/test/CodeGen/object-size-flex-array.c`) that cover many cases where the builtin is lowered to a constant. Can you incorporate whichever parts of those work with this PR? https://github.com/llvm/llvm-project/pull/166191 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
