[clang] [clang-tools-extra] [clang] Trim large(-ish) includes from common headers (PR #216946)

Chandler Carruth via cfe-commits cfe-commits at lists.llvm.org
Sat Aug 22 15:05:09 PDT 2026


================
@@ -163,11 +164,8 @@ class GlobalDecl {
     return GD;
   }
 
-  static KernelReferenceKind getDefaultKernelReference(const FunctionDecl *D) {
-    return (D->hasAttr<DeviceKernelAttr>() || D->getLangOpts().CUDAIsDevice)
-               ? KernelReferenceKind::Kernel
-               : KernelReferenceKind::Stub;
-  }
+  CLANG_ABI static KernelReferenceKind
----------------
chandlerc wrote:

All of the out-of-line APIs in this file have `CLANG_ABI` on them. My understanding is that because this method is called from some of the inline functions in this header, it needs to be exported if Clang is built into a shared library.

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


More information about the cfe-commits mailing list