[llvm-commits] [poolalloc] r131893 - /poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c
Arushi Aggarwal
aggarwa4 at illinois.edu
Sun May 22 18:37:07 PDT 2011
Author: aggarwa4
Date: Sun May 22 20:37:07 2011
New Revision: 131893
URL: http://llvm.org/viewvc/llvm-project?rev=131893&view=rev
Log:
Added comments.
Modified:
poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c
Modified: poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c?rev=131893&r1=131892&r2=131893&view=diff
==============================================================================
--- poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c (original)
+++ poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c Sun May 22 20:37:07 2011
@@ -212,17 +212,26 @@
#endif
}
+/**
+ * Initialize metadata for the pointer returned by __ctype_b_loc
+ */
void trackctype(void *ptr, uint32_t tag) {
trackInitInst(ptr, sizeof(short*), tag);
trackInitInst(*(short**)ptr, sizeof(short)*384, tag);
}
+/**
+ * Initialize metadata for the dst pointer of strncpy
+ */
void trackStrncpyInst(void *dst, void *src, uint64_t size, uint32_t tag) {
if(strlen(src) < size)
size = strlen(src);
copyTypeInfo(dst, src, size, tag);
}
+/**
+ * Initialize metadata for the dst pointer of strcpy
+ */
void trackStrcpyInst(void *dst, void *src, uint32_t tag) {
copyTypeInfo(dst, src, strlen(src), tag);
}
More information about the llvm-commits
mailing list