[llvm] [IR] Add initial support for the byte type (PR #178666)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 14 08:02:55 PST 2026
================
@@ -1396,6 +1365,40 @@ LLVM_C_ABI void LLVMDumpType(LLVMTypeRef Val);
*/
LLVM_C_ABI char *LLVMPrintTypeToString(LLVMTypeRef Val);
+/**
+ * @}
+ */
+
+/**
+ * @defgroup LLVMCCoreTypeByte Byte Types
+ *
+ * Functions in this section operate on byte types.
+ *
+ * @{
+ */
+
+/**
+ * Obtain a byte type from a context with specified bit width.
+ */
+LLVMTypeRef LLVMByte8TypeInContext(LLVMContextRef C);
+LLVMTypeRef LLVMByte16TypeInContext(LLVMContextRef C);
+LLVMTypeRef LLVMByte32TypeInContext(LLVMContextRef C);
+LLVMTypeRef LLVMByte64TypeInContext(LLVMContextRef C);
+LLVMTypeRef LLVMByte128TypeInContext(LLVMContextRef C);
+LLVMTypeRef LLVMByteTypeInContext(LLVMContextRef C, unsigned NumBits);
----------------
nikic wrote:
LLVMByteType should be dropped. LLVMGetByteTypeWidth is fine as it just needs the type, not the context.
https://github.com/llvm/llvm-project/pull/178666
More information about the llvm-commits
mailing list