[cfe-commits] r152789 - /cfe/trunk/include/clang/Basic/Builtins.def

Bill Wendling isanbard at gmail.com
Thu Mar 15 02:27:30 PDT 2012


Author: void
Date: Thu Mar 15 04:27:30 2012
New Revision: 152789

URL: http://llvm.org/viewvc/llvm-project?rev=152789&view=rev
Log:
Add the object size checking support for a few other builtins.

The functions memccpy, strdup, strndup, strlcat, and strlcpy should also have
object size checking support. Of course, this is only good if the C library also
supports these functions.
<rdar://problem/10528974>

Modified:
    cfe/trunk/include/clang/Basic/Builtins.def

Modified: cfe/trunk/include/clang/Basic/Builtins.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Builtins.def?rev=152789&r1=152788&r2=152789&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Builtins.def (original)
+++ cfe/trunk/include/clang/Basic/Builtins.def Thu Mar 15 04:27:30 2012
@@ -452,12 +452,17 @@
 // GCC Object size checking builtins
 BUILTIN(__builtin_object_size, "zvC*i", "n")
 BUILTIN(__builtin___memcpy_chk, "v*v*vC*zz", "nF")
+BUILTIN(__builtin___memccpy_chk, "v*v*vC*iz", "nF")
 BUILTIN(__builtin___memmove_chk, "v*v*vC*zz", "nF")
 BUILTIN(__builtin___mempcpy_chk, "v*v*vC*zz", "nF")
 BUILTIN(__builtin___memset_chk, "v*v*izz", "nF")
 BUILTIN(__builtin___stpcpy_chk, "c*c*cC*z", "nF")
 BUILTIN(__builtin___strcat_chk, "c*c*cC*z", "nF")
 BUILTIN(__builtin___strcpy_chk, "c*c*cC*z", "nF")
+BUILTIN(__builtin___strdup_chk, "c*cC*z", "nF")
+BUILTIN(__builtin___strndup_chk, "c*cC*zz", "nF")
+BUILTIN(__builtin___strlcat_chk, "c*c*cC*zz", "nF")
+BUILTIN(__builtin___strlcpy_chk, "c*c*cC*zz", "nF")
 BUILTIN(__builtin___strncat_chk, "c*c*cC*zz", "nF")
 BUILTIN(__builtin___strncpy_chk, "c*c*cC*zz", "nF")
 BUILTIN(__builtin___stpncpy_chk, "c*c*cC*zz", "nF")





More information about the cfe-commits mailing list