[clang] [llvm] [SPIRV] Add Target Builtins using Distance ext as an example (PR #121598)

Nathan Gauër via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 04:35:14 PST 2025


================
@@ -0,0 +1,59 @@
+//===- SemaSPIRV.cpp - Semantic Analysis for SPIRV constructs
+//---------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+// This implements Semantic Analysis for SPIRV constructs.
+//===----------------------------------------------------------------------===//
+
+#include "clang/Sema/SemaSPIRV.h"
+#include "clang/Basic/TargetBuiltins.h"
+#include "clang/Sema/Sema.h"
+
+namespace clang {
+
+SemaSPIRV::SemaSPIRV(Sema &S) : SemaBase(S) {}
+
+bool SemaSPIRV::CheckSPIRVBuiltinFunctionCall(unsigned BuiltinID,
+                                              CallExpr *TheCall) {
+  // position of memory order and scope arguments in the builtin
----------------
Keenuts wrote:

left over from C/C?

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


More information about the llvm-commits mailing list