Add transfer function logic for alloca().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58552 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index dc5f3fa..6162592 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -1241,6 +1241,16 @@
             continue;            
           }
             
+          case Builtin::BI__builtin_alloca: {
+            // FIXME: Handle size.
+            // FIXME: Refactor into StoreManager itself?
+            MemRegionManager& RM = getStateManager().getRegionManager();
+            const MemRegion* R =
+              RM.getAllocaRegion(CE, Builder->getCurrentBlockCount());            
+            MakeNode(Dst, CE, *DI, BindExpr(St, CE, loc::MemRegionVal(R)));
+            continue;            
+          }
+            
           default:
             break;
         }