diff options
author | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-10-06 15:11:06 +0000 |
---|---|---|
committer | Gordon Henriksen <gordonhenriksen@mac.com> | 2007-10-06 15:11:06 +0000 |
commit | e3b989d4a4ba47f77d5d38c35ff17e9673d9f87b (patch) | |
tree | 35133c2bda61e4ee882053c7f4598872957ac4da /lib/VMCore/Core.cpp | |
parent | 4647569fe7706e76135a08ca0e5f90a447ccc5b4 (diff) | |
download | external_llvm-e3b989d4a4ba47f77d5d38c35ff17e9673d9f87b.zip external_llvm-e3b989d4a4ba47f77d5d38c35ff17e9673d9f87b.tar.gz external_llvm-e3b989d4a4ba47f77d5d38c35ff17e9673d9f87b.tar.bz2 |
Adopting a uniform naming convention for constant constructors in bindings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index 71a3b6d..1bb8c17 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -200,11 +200,11 @@ void LLVMDumpValue(LLVMValueRef Val) { /*--.. Operations on constants of any type .................................--*/ -LLVMValueRef LLVMGetNull(LLVMTypeRef Ty) { +LLVMValueRef LLVMConstNull(LLVMTypeRef Ty) { return wrap(Constant::getNullValue(unwrap(Ty))); } -LLVMValueRef LLVMGetAllOnes(LLVMTypeRef Ty) { +LLVMValueRef LLVMConstAllOnes(LLVMTypeRef Ty) { return wrap(Constant::getAllOnesValue(unwrap(Ty))); } @@ -228,40 +228,39 @@ int LLVMIsUndef(LLVMValueRef Val) { /*--.. Operations on scalar constants ......................................--*/ -LLVMValueRef LLVMGetIntConstant(LLVMTypeRef IntTy, unsigned long long N, - int SignExtend) { +LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N, + int SignExtend) { return wrap(ConstantInt::get(unwrap<IntegerType>(IntTy), N, SignExtend != 0)); } -LLVMValueRef LLVMGetRealConstant(LLVMTypeRef RealTy, double N) { +LLVMValueRef LLVMConstReal(LLVMTypeRef RealTy, double N) { return wrap(ConstantFP::get(unwrap(RealTy), APFloat(N))); } /*--.. Operations on composite constants ...................................--*/ -LLVMValueRef LLVMGetStringConstant(const char *Str, unsigned Length, - int DontNullTerminate) { +LLVMValueRef LLVMConstString(const char *Str, unsigned Length, + int DontNullTerminate) { /* Inverted the sense of AddNull because ', 0)' is a better mnemonic for null termination than ', 1)'. */ return wrap(ConstantArray::get(std::string(Str, Length), DontNullTerminate == 0)); } -LLVMValueRef LLVMGetArrayConstant(LLVMTypeRef ElementTy, - LLVMValueRef *ConstantVals, unsigned Length) { +LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy, + LLVMValueRef *ConstantVals, unsigned Length) { return wrap(ConstantArray::get(ArrayType::get(unwrap(ElementTy), Length), unwrap<Constant>(ConstantVals, Length), Length)); } -LLVMValueRef LLVMGetStructConstant(LLVMValueRef *ConstantVals, unsigned Count, - int Packed) { +LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count, + int Packed) { return wrap(ConstantStruct::get(unwrap<Constant>(ConstantVals, Count), Count, Packed != 0)); } -LLVMValueRef LLVMGetVectorConstant(LLVMValueRef *ScalarConstantVals, - unsigned Size) { +LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, unsigned Size) { return wrap(ConstantVector::get(unwrap<Constant>(ScalarConstantVals, Size), Size)); } |