diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2025-01-05 12:29:37 +1100 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2025-01-05 22:16:25 +1100 |
| commit | 1b62645418c40b663c1726131837d68fa575f15c (patch) | |
| tree | 150dcc4384aa67afc000e75c3ff2f29c36085115 /compiler/rustc_codegen_llvm/src/debuginfo/dwarf_const.rs | |
| parent | e26710610490da43b30e66747c713b382fe62794 (diff) | |
| download | rust-1b62645418c40b663c1726131837d68fa575f15c.tar.gz rust-1b62645418c40b663c1726131837d68fa575f15c.zip | |
Use constants for DWARF opcodes, instead of FFI calls
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo/dwarf_const.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/dwarf_const.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/dwarf_const.rs b/compiler/rustc_codegen_llvm/src/debuginfo/dwarf_const.rs index f0542264404..40842915222 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/dwarf_const.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/dwarf_const.rs @@ -27,3 +27,11 @@ declare_constant!(DW_ATE_float: c_uint); declare_constant!(DW_ATE_signed: c_uint); declare_constant!(DW_ATE_unsigned: c_uint); declare_constant!(DW_ATE_UTF: c_uint); + +// DWARF expression operators. +declare_constant!(DW_OP_deref: u64); +declare_constant!(DW_OP_plus_uconst: u64); +/// Defined by LLVM in `llvm/include/llvm/BinaryFormat/Dwarf.h`. +/// Double-checked by a static assertion in `RustWrapper.cpp`. +#[allow(non_upper_case_globals)] +pub(crate) const DW_OP_LLVM_fragment: u64 = 0x1000; |
