Commit Graph

5 Commits

Author SHA1 Message Date
David Blaikie 0a21d0da17 PR14566: Debug Info: avoid top level lexical blocks in functions
One of the gotchas (see changes to CodeGenFunction) was due to the fix in
r139416 (for PR10829). This only worked previously because the top level
lexical block would set the location to the end of the function, the debug
location would be updated (as per r139416), the location would be set to
the end of the function again (but that would no-op, since it was the same
as the previous location), then the return instruction would be emitted using
the debug location.

Once the top level lexical block was no longer emitted, the end-of-function
location change was causing the debug loc to be updated, regressing that bug.

llvm-svn: 173593
2013-01-26 22:16:26 +00:00
Eric Christopher 7cdf948601 Recommit:
Start handling debug line and scope information better:

    Migrate most of the location setting within the larger API in CGDebugInfo and
    update a lot of callers.
    Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
    and replace it with DILexicalBlockFile usage.

    Finishes off the rest of rdar://10246360

after fixing a few bugs that were exposed in gdb testsuite testing.

llvm-svn: 141893
2011-10-13 21:45:18 +00:00
Eric Christopher 93663b3c62 Revert file/scope handling patches. gdb testing revealed a couple of bugs.
llvm-svn: 141796
2011-10-12 18:39:35 +00:00
Eric Christopher 498b7fd7fe Start handling debug line and scope information better:
Migrate most of the location setting within the larger API in CGDebugInfo and
update a lot of callers.
Remove the existing file/scope change machinery in UpdateLineDirectiveRegion
and replace it with DILexicalBlockFile usage.

Finishes off the rest of rdar://10246360

llvm-svn: 141732
2011-10-11 23:00:55 +00:00
Devang Patel 28b5286bda While handling change of file, check if _current_ file is already seen or not. If current file is seen then it indicates that end of previous file's lexical scope.
This fixes radar 8396182.

llvm-svn: 114018
2010-09-15 20:50:40 +00:00