[llvm-commits] [poolalloc] r131248 - /poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c

Arushi Aggarwal aggarwa4 at illinois.edu
Thu May 12 14:46:57 PDT 2011


Author: aggarwa4
Date: Thu May 12 16:46:57 2011
New Revision: 131248

URL: http://llvm.org/viewvc/llvm-project?rev=131248&view=rev
Log:
Add a function that given two type ids compares them.

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=131248&r1=131247&r2=131248&view=diff
==============================================================================
--- poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c (original)
+++ poolalloc/trunk/runtime/DynamicTypeChecks/TypeRuntime.c Thu May 12 16:46:57 2011
@@ -95,6 +95,16 @@
 #endif
 }
 
+/** 
+ * Check that the two types match
+ */
+void compareTypes(uint8_t typeNumberSrc, uint8_t typeNumberDest, uint32_t tag) {
+  //TODO:add size info
+  if(typeNumberSrc != typeNumberDest) {
+      printf("Type mismatch: detecting %u, expecting %u! %u \n", typeNumberDest, typeNumberSrc, tag);
+  }
+}
+
 /**
  * Check the loaded type against the type recorded in the shadow memory.
  */





More information about the llvm-commits mailing list