diff options
Diffstat (limited to 'llvm/lib/VMCore')
-rw-r--r-- | llvm/lib/VMCore/Core.cpp | 7 | ||||
-rw-r--r-- | llvm/lib/VMCore/Instructions.cpp | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/VMCore/Core.cpp b/llvm/lib/VMCore/Core.cpp index b2aa9f45370..1dbf5c44efc 100644 --- a/llvm/lib/VMCore/Core.cpp +++ b/llvm/lib/VMCore/Core.cpp @@ -1118,7 +1118,8 @@ unsigned LLVMGetFunctionCallConv(LLVMValueRef Fn) { } void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC) { - return unwrap<Function>(Fn)->setCallingConv(CC); + return unwrap<Function>(Fn)->setCallingConv( + static_cast<CallingConv::ID>(CC)); } const char *LLVMGetGC(LLVMValueRef Fn) { @@ -1362,9 +1363,9 @@ unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr) { void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC) { Value *V = unwrap(Instr); if (CallInst *CI = dyn_cast<CallInst>(V)) - return CI->setCallingConv(CC); + return CI->setCallingConv(static_cast<CallingConv::ID>(CC)); else if (InvokeInst *II = dyn_cast<InvokeInst>(V)) - return II->setCallingConv(CC); + return II->setCallingConv(static_cast<CallingConv::ID>(CC)); llvm_unreachable("LLVMSetInstructionCallConv applies only to call and invoke!"); } diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp index e4cf5f461aa..a12075fe0d9 100644 --- a/llvm/lib/VMCore/Instructions.cpp +++ b/llvm/lib/VMCore/Instructions.cpp @@ -45,10 +45,10 @@ CallSite::CallSite(Instruction *C) { I.setPointer(C); I.setInt(isa<CallInst>(C)); } -unsigned CallSite::getCallingConv() const { +CallingConv::ID CallSite::getCallingConv() const { CALLSITE_DELEGATE_GETTER(getCallingConv()); } -void CallSite::setCallingConv(unsigned CC) { +void CallSite::setCallingConv(CallingConv::ID CC) { CALLSITE_DELEGATE_SETTER(setCallingConv(CC)); } const AttrListPtr &CallSite::getAttributes() const { |