mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
add a 'LLVMConstIntOfArbitraryPrecision' api to the C api,
patch by Greg Pfeil! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119989 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
79b967bd9f
commit
5400570097
@ -547,6 +547,9 @@ LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count);
|
|||||||
/* Operations on scalar constants */
|
/* Operations on scalar constants */
|
||||||
LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
|
LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
|
||||||
LLVMBool SignExtend);
|
LLVMBool SignExtend);
|
||||||
|
LLVMValueRef LLVMConstIntOfArbitraryPrecision(LLVMTypeRef IntTy,
|
||||||
|
unsigned NumWords,
|
||||||
|
const uint64_t Words[]);
|
||||||
LLVMValueRef LLVMConstIntOfString(LLVMTypeRef IntTy, const char *Text,
|
LLVMValueRef LLVMConstIntOfString(LLVMTypeRef IntTy, const char *Text,
|
||||||
uint8_t Radix);
|
uint8_t Radix);
|
||||||
LLVMValueRef LLVMConstIntOfStringAndSize(LLVMTypeRef IntTy, const char *Text,
|
LLVMValueRef LLVMConstIntOfStringAndSize(LLVMTypeRef IntTy, const char *Text,
|
||||||
|
@ -547,6 +547,14 @@ LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
|
|||||||
return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), N, SignExtend != 0));
|
return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), N, SignExtend != 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLVMValueRef LLVMConstIntOfArbitraryPrecision(LLVMTypeRef IntTy,
|
||||||
|
unsigned NumWords,
|
||||||
|
const uint64_t Words[]) {
|
||||||
|
IntegerType *Ty = unwrap<IntegerType>(IntTy);
|
||||||
|
return wrap(ConstantInt::get(Ty->getContext(),
|
||||||
|
APInt(Ty->getBitWidth(), NumWords, Words)));
|
||||||
|
}
|
||||||
|
|
||||||
LLVMValueRef LLVMConstIntOfString(LLVMTypeRef IntTy, const char Str[],
|
LLVMValueRef LLVMConstIntOfString(LLVMTypeRef IntTy, const char Str[],
|
||||||
uint8_t Radix) {
|
uint8_t Radix) {
|
||||||
return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), StringRef(Str),
|
return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), StringRef(Str),
|
||||||
|
Loading…
Reference in New Issue
Block a user