rust/compiler/rustc_codegen_llvm/src/debuginfo
bors 234781afe3 Auto merge of #82285 - nhwn:nonzero-debug, r=nagisa
Use u32 over Option<u32> in DebugLoc

~~Changes `Option<u32>` fields in `DebugLoc` to `Option<NonZeroU32>`. Since the respective fields (`line` and `col`) are guaranteed to be 1-based, this layout optimization is a freebie.~~

EDIT: Changes `Option<u32>` fields in `DebugLoc` to `u32`. As `@bugadani` pointed out, an `Option<NonZeroU32>` is probably an unnecessary layer of abstraction since the `None` variant is always used as `UNKNOWN_LINE_NUMBER` (which is just `0`).  Also, `SourceInfo` in `metadata.rs` already uses a `u32` instead of an `Option<u32>` to encode the same information, so I think this change is warranted.

Since `@jyn514` raised some concerns over measuring performance in a similar PR (#82255), does this need a perf run?
2021-03-07 20:23:23 +00:00
..
create_scope_map.rs nhwn: use plain u32 in DebugLoc 2021-02-20 11:46:58 -06:00
doc.rs rustc_codegen_llvm: create DIFiles from just SourceFiles. 2020-10-21 04:43:56 +03:00
gdb.rs Collapse all uses of target.options.foo into target.foo 2020-11-08 17:29:13 +03:00
metadata.rs Auto merge of #82285 - nhwn:nonzero-debug, r=nagisa 2021-03-07 20:23:23 +00:00
mod.rs Auto merge of #82285 - nhwn:nonzero-debug, r=nagisa 2021-03-07 20:23:23 +00:00
namespace.rs Address review comment 2020-09-25 22:48:44 +01:00
utils.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00