forked from OSchip/llvm-project
Fix for PR5801: codegen memcpy, memmove, memset directly to LLVM intrinsics.
llvm-svn: 91573
This commit is contained in:
parent
d970acb60f
commit
7f4933f6c7
|
@ -302,6 +302,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
|
|||
llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1));
|
||||
return RValue::get(Address);
|
||||
}
|
||||
case Builtin::BImemcpy:
|
||||
case Builtin::BI__builtin_memcpy: {
|
||||
Value *Address = EmitScalarExpr(E->getArg(0));
|
||||
Builder.CreateCall4(CGM.getMemCpyFn(), Address,
|
||||
|
@ -310,6 +311,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
|
|||
llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1));
|
||||
return RValue::get(Address);
|
||||
}
|
||||
case Builtin::BImemmove:
|
||||
case Builtin::BI__builtin_memmove: {
|
||||
Value *Address = EmitScalarExpr(E->getArg(0));
|
||||
Builder.CreateCall4(CGM.getMemMoveFn(), Address,
|
||||
|
@ -318,6 +320,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
|
|||
llvm::ConstantInt::get(llvm::Type::getInt32Ty(VMContext), 1));
|
||||
return RValue::get(Address);
|
||||
}
|
||||
case Builtin::BImemset:
|
||||
case Builtin::BI__builtin_memset: {
|
||||
Value *Address = EmitScalarExpr(E->getArg(0));
|
||||
Builder.CreateCall4(CGM.getMemSetFn(), Address,
|
||||
|
|
Loading…
Reference in New Issue