llvm.org GIT mirror llvm / bd1d6a8
Detect VLAs. Do not use DenseMap operator[] because it inserts new entry if lookup fails. Use find() to check an entry in a DenseMap first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81058 91177308-0d34-0410-b5e6-96231b3b80d8 Devang Patel 11 years ago
1 changed file(s) with 5 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
39803980 // Don't handle byval struct arguments or VLAs, for example.
39813981 if (!AI)
39823982 return 0;
3983 int FI = FuncInfo.StaticAllocaMap[AI];
3983 DenseMap::iterator SI =
3984 FuncInfo.StaticAllocaMap.find(AI);
3985 if (SI == FuncInfo.StaticAllocaMap.end())
3986 return 0; // VLAs.
3987 int FI = SI->second;
39843988 DW->RecordVariable(cast(Variable), FI);
39853989 return 0;
39863990 }