diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp index 04e97212ddf..fb3d101f122 100644 --- a/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -388,11 +388,11 @@ bool FastISel::SelectCall(User *I) { if (BitCastInst *BCI = dyn_cast(Address)) Address = BCI->getOperand(0); AllocaInst *AI = dyn_cast(Address); - // Don't handle byval struct arguments, for example. + // Don't handle byval struct arguments or VLAs, for example. if (!AI) break; DenseMap::iterator SI = StaticAllocaMap.find(AI); - assert(SI != StaticAllocaMap.end() && "Invalid dbg.declare!"); + if (SI == StaticAllocaMap.end()) break; // VLAs. int FI = SI->second; // Determine the debug globalvariable.