forked from OSchip/llvm-project
8e6c36eb80
CodeGenFunction objects aren't really designed to be reused for more than one function, and doing so can leak debug info location information from one function into the prologue of the next. Add an assertion in to catch reuses of CodeGenFunction, which surprisingly only caught the ObjC atomic getter/setter cases. Fix those and add a test to demonstrate the issue. The test is a bit slim, because we're just testing for the absence of a debug location on the prologue instructions, which by itself probably wouldn't be the end of the world - but the particular debug location that was ending up there was for the previous function's last instruction. This produced debug info for another function within this function, which is something I'm trying to remove all cases of as its a substantial source of bugs, especially around inlining (see r219215). llvm-svn: 219690 |
||
---|---|---|
clang | ||
clang-tools-extra | ||
compiler-rt | ||
debuginfo-tests | ||
libclc | ||
libcxx | ||
libcxxabi | ||
lld | ||
lldb | ||
llvm | ||
openmp | ||
polly |