diff options
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r-- | lib/VMCore/Core.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index b2aa9f4537..1dbf5c44ef 100644 --- a/lib/VMCore/Core.cpp +++ b/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!"); } |