[llvm] [C API] Add function to create constantRange attributes to C API (PR #90505)

Andreas Jonson via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 30 22:07:40 PDT 2024


================
@@ -178,6 +179,18 @@ LLVMTypeRef LLVMGetTypeAttributeValue(LLVMAttributeRef A) {
   return wrap(Attr.getValueAsType());
 }
 
+LLVMAttributeRef LLVMCreateConstantRangeAttribute(
+    LLVMContextRef C, unsigned KindID, unsigned NumBits, unsigned LowerNumWords,
+    const uint64_t LowerWords[], unsigned UpperNumWords,
+    const uint64_t UpperWords[]) {
----------------
andjo403 wrote:

maybe redundant to have two numWords assume that same array size will be used for both. 
not many other functions that have an array only LLVMConstIntOfArbitraryPrecision before this and it have the numwords do not know if we want to stick to a pattern.

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


More information about the llvm-commits mailing list