]> granicus.if.org Git - clang/commitdiff
Fix for PR5801: codegen memcpy, memmove, memset directly to LLVM intrinsics.
authorEli Friedman <eli.friedman@gmail.com>
Thu, 17 Dec 2009 00:14:28 +0000 (00:14 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Thu, 17 Dec 2009 00:14:28 +0000 (00:14 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91573 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBuiltin.cpp

index 96bc3ef62cb2c24144ac86d38b4c3839e83ba6ce..a3f83a77be530e084d66d0da5f2bda2bc8a32d2c 100644 (file)
@@ -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,