diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2009-12-17 00:14:28 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2009-12-17 00:14:28 +0000 |
commit | 7f4933f6c72f85f2fb2559f1d9ffe98b074454e6 (patch) | |
tree | 0692b1ee419dea8f3270a6ee67bb10cdef1be008 /clang/lib/CodeGen | |
parent | d970acb60fbe52ac47062298953738d76828e913 (diff) | |
download | bcm5719-llvm-7f4933f6c72f85f2fb2559f1d9ffe98b074454e6.tar.gz bcm5719-llvm-7f4933f6c72f85f2fb2559f1d9ffe98b074454e6.zip |
Fix for PR5801: codegen memcpy, memmove, memset directly to LLVM intrinsics.
llvm-svn: 91573
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index 96bc3ef62cb..a3f83a77be5 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -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, |