vsk added inline comments.
================ Comment at: test/CodeGenObjC/debug-info-blocks.m:20 // CHECK: call {{.*}}, !dbg ![[DBG_LINE:[0-9]+]] // CHECK-NOT: ret // CHECK: load {{.*}}, !dbg ![[COPY_LINE:[0-9]+]] ---------------- aprantl wrote: > aprantl wrote: > > vsk wrote: > > > aprantl wrote: > > > > What's the location used for the ret? I think it should also be` > > > > ![[DBG_LINE]]` since we are not actually executing the block. > > > We're using COPY_LINE, which is the same location used for the load > > > instruction below. > > > > > > What's the semantic difference between DBG_LINE (line 0) and COPY_LINE > > > (line 68) anyway? Why do we have two different locations for the > > > arguments to this function? > > The debugger will skip over line 0 locations when single-stepping or when > > setting breakpoints. I can't tell without reading the code why we decide to > > put a line 0 on the call. > The important thing is that the testcase should check that the ret has either > COPY_LINE or line 0 on it and not line 71. I'll fix up the test case. It looks like the zero location is an artifact of CodeGenFunction::StartFunction: ``` 1128 // Emit a location at the end of the prologue. 1129 if (CGDebugInfo *DI = getDebugInfo()) 1130 DI->EmitLocation(Builder, StartLoc); ``` I think it's unnecessary, but maybe we can look into that separately? https://reviews.llvm.org/D39310 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits