While finishing a function without a valid end location, fall back to an
artificial debug location when generating IR for cleanups. This fixes a
verifier failure ("inlinable function call without debug info").
rdar://57630879
Differential D71042
[DebugInfo] Ensure fallback artificial location is available for cleanups aprantl on Dec 4 2019, 7:26 PM. Authored by
Details While finishing a function without a valid end location, fall back to an rdar://57630879
Diff Detail
Event TimelineComment Actions This will definitely work; Once you got the testcase, it might be good to check whether there is a more targeted root cause that we could fix and assert on EndLoc here. Comment Actions I believe the root cause is that GenerateObjCSetter does not pass a valid EndLoc, and does not have a 'simple' return statement. That seems reasonable to me, after all FinishFunction() defaults EndLoc to an invalid location, and there is no explicit return statement for an ObjC setter in source. Comment Actions We looked at this together and it seems the forward declaration for the synthesized setter in the ObjCImplDecl doesn't have a valid source location. I'm going to investigate a more targeted fix. Comment Actions Thanks, lgtm with a minor change.
Comment Actions This is causing a failure in debuginfo-tests: Assertion failed: (EndLoc.isValid() && "no location for inlineable cleanup calls") |
The braces around the else block are probably needed in the NDEBUG build.