about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-06-30 00:35:19 +0000
committerbors <bors@rust-lang.org>2023-06-30 00:35:19 +0000
commitb51f778846583a8da722673c2a10c3f65c2b5c59 (patch)
tree7aebd0165285498c4ba1c3c9682e8fbe609ed4fe
parent2cdf8a4c3fd4267b41d1a557478e58236752717a (diff)
parent9db001dfbb79107de53bb187f388f7dd1f711413 (diff)
downloadrust-b51f778846583a8da722673c2a10c3f65c2b5c59.tar.gz
rust-b51f778846583a8da722673c2a10c3f65c2b5c59.zip
Auto merge of #113116 - nnethercote:codegen-opts, r=oli-obk
A mish-mash of micro-optimizations

These were aimed at speeding up LLVM codegen, but ended up affecting other places as well.

r? `@bjorn3`
-rw-r--r--src/debuginfo/line_info.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/debuginfo/line_info.rs b/src/debuginfo/line_info.rs
index 463de6a91c7..1b454b6667c 100644
--- a/src/debuginfo/line_info.rs
+++ b/src/debuginfo/line_info.rs
@@ -81,7 +81,7 @@ impl DebugContext {
 
         match tcx.sess.source_map().lookup_line(span.lo()) {
             Ok(SourceFileAndLine { sf: file, line }) => {
-                let line_pos = file.line_begin_pos(span.lo());
+                let line_pos = file.lines(|lines| lines[line]);
 
                 (
                     file,