[cfe-commits] r43435 - in /cfe/trunk: AST/Builtins.cpp include/clang/AST/Builtins.def

Chris Lattner sabre at nondot.org
Sun Oct 28 21:18:06 PDT 2007


Author: lattner
Date: Sun Oct 28 23:18:06 2007
New Revision: 43435

URL: http://llvm.org/viewvc/llvm-project?rev=43435&view=rev
Log:
Add prototype info for __builtin_memcpy, reducing #diagnostics from 37 to 34 on 
PR1750

Modified:
    cfe/trunk/AST/Builtins.cpp
    cfe/trunk/include/clang/AST/Builtins.def

Modified: cfe/trunk/AST/Builtins.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/AST/Builtins.cpp?rev=43435&r1=43434&r2=43435&view=diff

==============================================================================
--- cfe/trunk/AST/Builtins.cpp (original)
+++ cfe/trunk/AST/Builtins.cpp Sun Oct 28 23:18:06 2007
@@ -130,6 +130,10 @@
     else
       Type = Context.CharTy;
     break;
+  case 'z':  // size_t.
+    assert(!Long && !Signed && !Unsigned && "Bad modifiers for 'z'!");
+    Type = Context.getSizeType();
+    break;
   case 'F':
     Type = Context.getCFConstantStringType();
     break;

Modified: cfe/trunk/include/clang/AST/Builtins.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Builtins.def?rev=43435&r1=43434&r2=43435&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/Builtins.def (original)
+++ cfe/trunk/include/clang/AST/Builtins.def Sun Oct 28 23:18:06 2007
@@ -29,6 +29,7 @@
 //  i -> int
 //  f -> float
 //  d -> double
+//  z -> size_t
 //  F -> constant CFString
 //  V -> __builtin_va_list
 //  . -> "...".  This may only occur at the end of the function list.
@@ -63,5 +64,6 @@
 BUILTIN(__builtin_va_start, "vV&.", "n")
 BUILTIN(__builtin_va_end, "vV&", "n")
 BUILTIN(__builtin_va_copy, "vV&V", "n")
+BUILTIN(__builtin_memcpy, "v*v*vC*z", "n")
 
 #undef BUILTIN





More information about the cfe-commits mailing list