[llvm-commits] [poolalloc] r133675 - /poolalloc/trunk/lib/AssistDS/TypeChecksOpt.cpp

Arushi Aggarwal aggarwa4 at illinois.edu
Wed Jun 22 17:57:30 PDT 2011


Author: aggarwa4
Date: Wed Jun 22 19:57:30 2011
New Revision: 133675

URL: http://llvm.org/viewvc/llvm-project?rev=133675&view=rev
Log:
Use TypeTagTy

Modified:
    poolalloc/trunk/lib/AssistDS/TypeChecksOpt.cpp

Modified: poolalloc/trunk/lib/AssistDS/TypeChecksOpt.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/AssistDS/TypeChecksOpt.cpp?rev=133675&r1=133674&r2=133675&view=diff
==============================================================================
--- poolalloc/trunk/lib/AssistDS/TypeChecksOpt.cpp (original)
+++ poolalloc/trunk/lib/AssistDS/TypeChecksOpt.cpp Wed Jun 22 19:57:30 2011
@@ -41,6 +41,8 @@
 static const Type *Int32Ty = 0;
 static const Type *Int64Ty = 0;
 static const PointerType *VoidPtrTy = 0;
+static const Type *TypeTagTy = 0;
+static const Type *TypeTagPtrTy = 0;
 static Constant *trackGlobal;
 static Constant *trackStringInput;
 static Constant *trackInitInst;
@@ -60,11 +62,13 @@
   Int32Ty = IntegerType::getInt32Ty(M.getContext());
   Int64Ty = IntegerType::getInt64Ty(M.getContext());
   VoidPtrTy = PointerType::getUnqual(Int8Ty);
+  TypeTagTy = Int8Ty;
+  TypeTagPtrTy = PointerType::getUnqual(TypeTagTy);
 
   trackGlobal = M.getOrInsertFunction("trackGlobal",
                                       VoidTy,
                                       VoidPtrTy,/*ptr*/
-                                      Int8Ty,/*type*/
+                                      TypeTagTy,/*type*/
                                       Int64Ty,/*size*/
                                       Int32Ty,/*tag*/
                                       NULL);
@@ -83,13 +87,13 @@
   trackStoreInst = M.getOrInsertFunction("trackStoreInst",
                                          VoidTy,
                                          VoidPtrTy,/*ptr*/
-                                         Int8Ty,/*type*/
+                                         TypeTagTy,/*type*/
                                          Int64Ty,/*size*/
                                          Int32Ty,/*tag*/
                                          NULL);
   checkTypeInst = M.getOrInsertFunction("checkType",
                                         VoidTy,
-                                        Int8Ty,/*type*/
+                                        TypeTagTy,/*type*/
                                         Int64Ty,/*size*/
                                         VoidPtrTy,
                                         VoidPtrTy,/*ptr*/
@@ -105,7 +109,7 @@
   setTypeInfo = M.getOrInsertFunction("setTypeInfo",
                                        VoidTy,
                                        VoidPtrTy,/*dest ptr*/
-                                       VoidPtrTy,/*metadata*/
+                                       TypeTagPtrTy,/*metadata*/
                                        Int64Ty,/*size*/
                                        Int32Ty,/*tag*/
                                        NULL);





More information about the llvm-commits mailing list