[clang] [CIR] Handle ImportDecl in emitTopLevelDecl (PR #221720)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 8 17:46:13 PDT 2026


================
@@ -0,0 +1,24 @@
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu \
+// RUN:   -emit-module-interface %S/Inputs/modules-import-iface.cppm -o %t.pcm
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu \
+// RUN:   -fclangir -emit-cir -fmodule-file=m=%t.pcm %s -o %t.cir
+// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu \
+// RUN:   -fclangir -emit-llvm -fmodule-file=m=%t.pcm %s -o %t.ll
+// RUN: FileCheck --check-prefix=LLVM --input-file=%t.ll %s
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu \
+// RUN:   -emit-llvm -fmodule-file=m=%t.pcm %s -o %t.og.ll
+// RUN: FileCheck --check-prefix=OGCG --input-file=%t.og.ll %s
----------------
andykaylor wrote:

```suggestion
// RUN: FileCheck --check-prefix=LLVM --input-file=%t.og.ll %s
```

https://github.com/llvm/llvm-project/pull/221720


More information about the cfe-commits mailing list