forked from OSchip/llvm-project
Put local variables in appropriate debug info scope.
This fixes radar 8757124. llvm-svn: 132949
This commit is contained in:
parent
b4956a7fac
commit
297207f813
|
@ -808,17 +808,17 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){
|
|||
return;
|
||||
}
|
||||
|
||||
// The local variable comes into scope immediately.
|
||||
AutoVarEmission variable = AutoVarEmission::invalid();
|
||||
if (const DeclStmt *SD = dyn_cast<DeclStmt>(S.getElement()))
|
||||
variable = EmitAutoVarAlloca(*cast<VarDecl>(SD->getSingleDecl()));
|
||||
|
||||
CGDebugInfo *DI = getDebugInfo();
|
||||
if (DI) {
|
||||
DI->setLocation(S.getSourceRange().getBegin());
|
||||
DI->EmitRegionStart(Builder);
|
||||
}
|
||||
|
||||
// The local variable comes into scope immediately.
|
||||
AutoVarEmission variable = AutoVarEmission::invalid();
|
||||
if (const DeclStmt *SD = dyn_cast<DeclStmt>(S.getElement()))
|
||||
variable = EmitAutoVarAlloca(*cast<VarDecl>(SD->getSingleDecl()));
|
||||
|
||||
JumpDest LoopEnd = getJumpDestInCurrentScope("forcoll.end");
|
||||
JumpDest AfterBody = getJumpDestInCurrentScope("forcoll.next");
|
||||
|
||||
|
|
Loading…
Reference in New Issue