aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
diff options
context:
space:
mode:
authorKuba Mracek <mracek@apple.com>2017-04-14 16:53:25 +0000
committerKuba Mracek <mracek@apple.com>2017-04-14 16:53:25 +0000
commit5e5e4e790f8758000fe08bc784d9cf6187d5e950 (patch)
treefc2656862ecceb04699f2f9a30ec05e1fce8b7ba /llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp
parent01545beb75566e16db480e929068f6cd9f3b98ef (diff)
downloadllvm-5e5e4e790f8758000fe08bc784d9cf6187d5e950.zip
llvm-5e5e4e790f8758000fe08bc784d9cf6187d5e950.tar.gz
llvm-5e5e4e790f8758000fe08bc784d9cf6187d5e950.tar.bz2
[ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt [take 2]
CodeGenFunction::EmitObjCForCollectionStmt currently emits lifetime markers for the loop variable in an inconsistent way: lifetime.start is emitted before the loop is entered, but lifetime.end is emitted inside the loop. AddressSanitizer uses these markers to track out-of-scope accesses to local variables, and we get false positives in Obj-C foreach loops (in the 2nd iteration of the loop). This patch keeps the loop variable alive for the whole loop by extending ForScope and registering the cleanup function inside EmitAutoVarAlloca. Differential Revision: https://reviews.llvm.org/D32029 llvm-svn: 300340
Diffstat (limited to 'llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp')
0 files changed, 0 insertions, 0 deletions