[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM, one nit https://github.com/llvm/llvm-project/pull/143984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/143984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,63 @@ +// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fcla

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-12 Thread Morris Hafner via cfe-commits
@@ -76,3 +76,21 @@ float constant_fp_builtin_single() { // OGCG: define {{.*}}float @_Z26constant_fp_builtin_singlev() // OGCG: ret float 0x3FB9A000 // OGCG: } + +void library_builtins() { + __builtin_printf(nullptr); mmha wrote: I added `builtin_prin

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/143984 >From c60378591a7d8d156306ff9c840aa319396c4f00 Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Fri, 13 Jun 2025 00:04:24 +0200 Subject: [PATCH 1/3] [CIR] Add Support For Library Builtins This patch upstreams sup

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha updated https://github.com/llvm/llvm-project/pull/143984 >From c60378591a7d8d156306ff9c840aa319396c4f00 Mon Sep 17 00:00:00 2001 From: Morris Hafner Date: Fri, 13 Jun 2025 00:04:24 +0200 Subject: [PATCH 1/2] [CIR] Add Support For Library Builtins This patch upstreams sup

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clangir Author: Morris Hafner (mmha) Changes This patch upstreams support for builtins that map to a standard library function. Examples would be abort() and printf(). It also fixes a minor issue with the errorNYI for all rem

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-12 Thread Morris Hafner via cfe-commits
https://github.com/mmha created https://github.com/llvm/llvm-project/pull/143984 This patch upstreams support for builtins that map to a standard library function. Examples would be abort() and printf(). It also fixes a minor issue with the errorNYI for all remaining unimplemented builtins usi