diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2020-11-08 14:27:51 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2020-11-08 17:29:13 +0300 |
| commit | bf66988aa1677d018928c271fed563792f921d28 (patch) | |
| tree | c007b5169182a6ba4b3ae15936b0061c080921b7 /compiler/rustc_codegen_llvm/src/debuginfo/mod.rs | |
| parent | 87a0997ef9c0bfad0ba362741afa601d8fb285b8 (diff) | |
| download | rust-bf66988aa1677d018928c271fed563792f921d28.tar.gz rust-bf66988aa1677d018928c271fed563792f921d28.zip | |
Collapse all uses of `target.options.foo` into `target.foo`
with an eye on merging `TargetOptions` into `Target`. `TargetOptions` as a separate structure is mostly an implementation detail of `Target` construction, all its fields logically belong to `Target` and available from `Target` through `Deref` impls.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo/mod.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs index 6bb93857d71..5065ff01aed 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs @@ -122,12 +122,12 @@ pub fn finalize(cx: &CodegenCx<'_, '_>) { // for macOS to understand. For more info see #11352 // This can be overridden using --llvm-opts -dwarf-version,N. // Android has the same issue (#22398) - if let Some(version) = cx.sess().target.options.dwarf_version { + if let Some(version) = cx.sess().target.dwarf_version { llvm::LLVMRustAddModuleFlag(cx.llmod, "Dwarf Version\0".as_ptr().cast(), version) } // Indicate that we want CodeView debug information on MSVC - if cx.sess().target.options.is_like_msvc { + if cx.sess().target.is_like_msvc { llvm::LLVMRustAddModuleFlag(cx.llmod, "CodeView\0".as_ptr().cast(), 1) } @@ -251,7 +251,7 @@ impl CodegenCx<'ll, '_> { // For MSVC, omit the column number. // Otherwise, emit it. This mimics clang behaviour. // See discussion in https://github.com/rust-lang/rust/issues/42921 - if self.sess().target.options.is_like_msvc { + if self.sess().target.is_like_msvc { DebugLoc { file, line, col: None } } else { DebugLoc { file, line, col } @@ -387,7 +387,7 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> { }); // Arguments types - if cx.sess().target.options.is_like_msvc { + if cx.sess().target.is_like_msvc { // FIXME(#42800): // There is a bug in MSDIA that leads to a crash when it encounters // a fixed-size array of `u8` or something zero-sized in a |
