mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
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
This commit is contained in:
parent
905cf5e0bd
commit
bd1d6a8ce1
@ -3981,7 +3981,11 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
|
||||
// Don't handle byval struct arguments or VLAs, for example.
|
||||
if (!AI)
|
||||
return 0;
|
||||
int FI = FuncInfo.StaticAllocaMap[AI];
|
||||
DenseMap<const AllocaInst*, int>::iterator SI =
|
||||
FuncInfo.StaticAllocaMap.find(AI);
|
||||
if (SI == FuncInfo.StaticAllocaMap.end())
|
||||
return 0; // VLAs.
|
||||
int FI = SI->second;
|
||||
DW->RecordVariable(cast<MDNode>(Variable), FI);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user