[clang] [clang][CodeGen] Skip __hip_cuid_ global in incremental(clang-repl) mode (PR #217228)

Aditya Sinha via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 19 22:05:03 PDT 2026


================
@@ -0,0 +1,14 @@
+// Check that the __hip_cuid_ global is emitted in normal HIP host
+// compilation, but skipped under incremental extensions (clang-repl),
+// where it would otherwise cause duplicate-symbol errors at JIT link time.
+
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -x hip -emit-llvm -cuid=abcd -o - %s | FileCheck --check-prefix=NORMAL %s
+
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -x hip -emit-llvm -fincremental-extensions -cuid=abcd -o - %s | FileCheck --check-prefix=INCR %s
----------------
AdityaSinha149 wrote:

I have added the device side tests. Please review

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


More information about the cfe-commits mailing list