about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2014-12-11 13:53:30 +0100
committerMichael Woerister <michaelwoerister@posteo>2015-01-21 10:48:10 +0100
commita55ef3a032bd842c86bbc93963c769b144809ef2 (patch)
tree2319ec5700497dc5e076244b0cbd1fedad2f0b7e /src/libsyntax
parent51e28dd0c88030b8661f0c414eb0af3e09840b31 (diff)
downloadrust-a55ef3a032bd842c86bbc93963c769b144809ef2.tar.gz
rust-a55ef3a032bd842c86bbc93963c769b144809ef2.zip
debuginfo: Make debuginfo source location assignment more stable (Pt. 1)
So far, the source location an LLVM instruction was linked to was controlled by
`debuginfo::set_source_location()` and `debuginfo::clear_source_location()`.
This interface mimicked how LLVM's `IRBuilder` handles debug location
assignment. While this interface has some theoretical performance benefits, it
also makes things terribly unstable: One sets some quasi-global state and then
hopes that it is still correct when a given instruction is emitted---an
assumption that has been proven to not hold a bit too often.

This patch requires the debug source location to be passed to the actual
instruction emitting function. This makes source location assignment explicit
and will prevent future changes to `trans` from accidentally breaking things in
the majority of cases.

This patch does not yet implement the new principle for all instruction kinds
but the stepping experience should have improved significantly nonetheless
already.
Diffstat (limited to 'src/libsyntax')
0 files changed, 0 insertions, 0 deletions