Fixed conflict between objc_memmove_collectable builtin
decl. and one ddefined in darwin header file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106107 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Basic/Builtins.def b/include/clang/Basic/Builtins.def
index a405a41..cad2824 100644
--- a/include/clang/Basic/Builtins.def
+++ b/include/clang/Basic/Builtins.def
@@ -540,7 +540,7 @@
// id objc_msgSend(id, SEL)
// but we need new type letters for that.
LIBBUILTIN(objc_msgSend, "v*.", "f", "objc/message.h")
-LIBBUILTIN(objc_memmove_collectable, "v*v*vC*z", "nF", "objc/objc-auto.h")
+BUILTIN(__builtin_objc_memmove_collectable, "v*v*vC*z", "nF")
// Builtin math library functions
LIBBUILTIN(pow, "ddd", "fe", "math.h")
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
index 2f6b131..db616c5 100644
--- a/lib/CodeGen/CGBuiltin.cpp
+++ b/lib/CodeGen/CGBuiltin.cpp
@@ -485,7 +485,7 @@
return RValue::get(Address);
}
- case Builtin::BIobjc_memmove_collectable: {
+ case Builtin::BI__builtin_objc_memmove_collectable: {
Value *Address = EmitScalarExpr(E->getArg(0));
Value *SrcAddr = EmitScalarExpr(E->getArg(1));
Value *SizeVal = EmitScalarExpr(E->getArg(2));
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index dfba2f8..2a881ff 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -4567,7 +4567,7 @@
// \brief Reference to the __builtin_memcpy function.
Expr *BuiltinMemCpyRef = 0;
- // \brief Reference to the objc_memmove_collectable function.
+ // \brief Reference to the __builtin_objc_memmove_collectable function.
Expr *CollectableMemCpyRef = 0;
// Assign non-static members.
@@ -4652,8 +4652,9 @@
if (NeedsCollectableMemCpy) {
if (!CollectableMemCpyRef) {
- // Create a reference to the objc_memmove_collectable function.
- LookupResult R(*this, &Context.Idents.get("objc_memmove_collectable"),
+ // Create a reference to the __builtin_objc_memmove_collectable function.
+ LookupResult R(*this,
+ &Context.Idents.get("__builtin_objc_memmove_collectable"),
Loc, LookupOrdinaryName);
LookupName(R, TUScope, true);