This is an archive of the discontinued LLVM Phabricator instance.

CodeGen: correct debug info generation
AbandonedPublic

Authored by compnerd on Dec 24 2014, 1:07 AM.

Details

Reviewers
dblaikie
Summary

Correct the debug info generation where operators would emit a location CFI directive. The generation of this directive requires an associated lexical block. However, if this statement is emitted into the epilogue, there is no associated lexical block as the operation is synthesized by the compiler. If there is no lexical block currently associated with the emission of the loc directive, take the current debug location as the scope.

Add a second unrelated change to prevent UB in the case that the LexicalBlockStack is empty.

TODO: generate test cases

Diff Detail

Event Timeline

compnerd updated this revision to Diff 17621.Dec 24 2014, 1:07 AM
compnerd retitled this revision from to CodeGen: correct debug info generation.
compnerd updated this object.
compnerd edited the test plan for this revision. (Show Details)
compnerd added a reviewer: dblaikie.
yaron.keren added a subscriber: Unknown Object (MLST).Dec 24 2014, 1:26 AM
yaron.keren added a subscriber: yaron.keren.
compnerd abandoned this revision.Jan 22 2015, 3:47 PM