[llvm] [LLVM] Add a C API for creating instructions with custom syncscopes. (PR #104775)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 07:19:42 PDT 2024


================
@@ -646,6 +646,26 @@ unsigned LLVMGetMDKindIDInContext(LLVMContextRef C, const char *Name,
                                   unsigned SLen);
 unsigned LLVMGetMDKindID(const char *Name, unsigned SLen);
 
+/**
+ * Maps a synchronization scope name to a ID unique within this context.
+ */
+unsigned LLVMGetSyncScopeIDInContext(LLVMContextRef C, const char *Name,
+                                     unsigned SLen);
----------------
nikic wrote:

I realize it's inconsistent with the function directly above, but we should really use size_t for string lengths.

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


More information about the llvm-commits mailing list