[llvm-commits] [poolalloc] r120082 - /poolalloc/trunk/lib/DSA/DataStructure.cpp

Arushi Aggarwal aggarwa4 at illinois.edu
Tue Nov 23 19:51:13 PST 2010


Author: aggarwa4
Date: Tue Nov 23 21:51:13 2010
New Revision: 120082

URL: http://llvm.org/viewvc/llvm-project?rev=120082&view=rev
Log:
Check that Type entry actually exists.

Modified:
    poolalloc/trunk/lib/DSA/DataStructure.cpp

Modified: poolalloc/trunk/lib/DSA/DataStructure.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DataStructure.cpp?rev=120082&r1=120081&r2=120082&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DataStructure.cpp (original)
+++ poolalloc/trunk/lib/DSA/DataStructure.cpp Tue Nov 23 21:51:13 2010
@@ -328,10 +328,12 @@
   const TargetData &TD = getParentGraph()->getTargetData();
   // check all offsets for that node.
   for(unsigned offset = 0; offset < getSize() ; offset++) {
-   // if that Node has no Type information, skip
-   if(TyMap.find(offset) == TyMap.end())
+    // if that Node has no Type information, skip
+    if(TyMap.find(offset) == TyMap.end())
       continue;
-    
+    if(!TyMap[offset])
+      continue;
+
     bool pointerTy = false;
     bool integerTy = false;
     unsigned intSize = 0;





More information about the llvm-commits mailing list