[clang] [CIR] Support inline C++ member function definitions (PR #142484)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 2 14:13:41 PDT 2025
================
@@ -0,0 +1,72 @@
+// 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
+
+struct S {
+ int Member;
+
+ int InlineFunc() {
+ return Member;
+ }
+
+ int OutlineFunc();
----------------
erichkeane wrote:
This isn't really necessary, right? Unless you want to provide an out-of-line definition to show that it gets emitted?
https://github.com/llvm/llvm-project/pull/142484
More information about the cfe-commits
mailing list