mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-08 21:37:35 +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. llvm-svn: 81058
This commit is contained in:
parent
c174e064b2
commit
7b422c1956
@ -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…
x
Reference in New Issue
Block a user