@@ -286,6 +286,7 @@ typedef enum {
286
286
LLVMInstructionValueKind ,
287
287
LLVMPoisonValueValueKind ,
288
288
LLVMConstantTargetNoneValueKind ,
289
+ LLVMConstantPtrAuthValueKind ,
289
290
} LLVMValueKind ;
290
291
291
292
typedef enum {
@@ -1666,6 +1667,35 @@ LLVMTypeRef LLVMScalableVectorType(LLVMTypeRef ElementType,
1666
1667
*/
1667
1668
unsigned LLVMGetVectorSize (LLVMTypeRef VectorTy );
1668
1669
1670
+ /**
1671
+ * Get the pointer value for the associated ConstantPtrAuth constant.
1672
+ *
1673
+ * @see llvm::ConstantPtrAuth::getPointer
1674
+ */
1675
+ LLVMValueRef LLVMGetConstantPtrAuthPointer (LLVMValueRef PtrAuth );
1676
+
1677
+ /**
1678
+ * Get the key value for the associated ConstantPtrAuth constant.
1679
+ *
1680
+ * @see llvm::ConstantPtrAuth::getKey
1681
+ */
1682
+ LLVMValueRef LLVMGetConstantPtrAuthKey (LLVMValueRef PtrAuth );
1683
+
1684
+ /**
1685
+ * Get the discriminator value for the associated ConstantPtrAuth constant.
1686
+ *
1687
+ * @see llvm::ConstantPtrAuth::getDiscriminator
1688
+ */
1689
+ LLVMValueRef LLVMGetConstantPtrAuthDiscriminator (LLVMValueRef PtrAuth );
1690
+
1691
+ /**
1692
+ * Get the address discriminator value for the associated ConstantPtrAuth
1693
+ * constant.
1694
+ *
1695
+ * @see llvm::ConstantPtrAuth::getAddrDiscriminator
1696
+ */
1697
+ LLVMValueRef LLVMGetConstantPtrAuthAddrDiscriminator (LLVMValueRef PtrAuth );
1698
+
1669
1699
/**
1670
1700
* @}
1671
1701
*/
@@ -1789,6 +1819,10 @@ unsigned LLVMGetTargetExtTypeIntParam(LLVMTypeRef TargetExtTy, unsigned Idx);
1789
1819
* @{
1790
1820
*/
1791
1821
1822
+ // Currently, clang-format tries to format the LLVM_FOR_EACH_VALUE_SUBCLASS
1823
+ // macro in a progressively-indented fashion, which is not desired
1824
+ // clang-format off
1825
+
1792
1826
#define LLVM_FOR_EACH_VALUE_SUBCLASS (macro ) \
1793
1827
macro(Argument) \
1794
1828
macro(BasicBlock) \
@@ -1808,6 +1842,7 @@ unsigned LLVMGetTargetExtTypeIntParam(LLVMTypeRef TargetExtTy, unsigned Idx);
1808
1842
macro(ConstantStruct) \
1809
1843
macro(ConstantTokenNone) \
1810
1844
macro(ConstantVector) \
1845
+ macro(ConstantPtrAuth) \
1811
1846
macro(GlobalValue) \
1812
1847
macro(GlobalAlias) \
1813
1848
macro(GlobalObject) \
@@ -1879,6 +1914,8 @@ unsigned LLVMGetTargetExtTypeIntParam(LLVMTypeRef TargetExtTy, unsigned Idx);
1879
1914
macro(AtomicRMWInst) \
1880
1915
macro(FenceInst)
1881
1916
1917
+ // clang-format on
1918
+
1882
1919
/**
1883
1920
* @defgroup LLVMCCoreValueGeneral General APIs
1884
1921
*
@@ -2372,6 +2409,14 @@ LLVM_ATTRIBUTE_C_DEPRECATED(
2372
2409
*/
2373
2410
LLVMValueRef LLVMConstVector (LLVMValueRef * ScalarConstantVals , unsigned Size );
2374
2411
2412
+ /**
2413
+ * Create a ConstantPtrAuth constant with the given values.
2414
+ *
2415
+ * @see llvm::ConstantPtrAuth::get()
2416
+ */
2417
+ LLVMValueRef LLVMConstantPtrAuth (LLVMValueRef Ptr , LLVMValueRef Key ,
2418
+ LLVMValueRef Disc , LLVMValueRef AddrDisc );
2419
+
2375
2420
/**
2376
2421
* @}
2377
2422
*/
0 commit comments