Reformat use
declarations.
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
This commit is contained in:
parent
118f9350c5
commit
84ac80f192
1865 changed files with 8367 additions and 9199 deletions
|
@ -1,12 +1,6 @@
|
|||
use crate::attributes;
|
||||
use crate::builder::Builder;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::llvm::{self, Attribute, AttributePlace};
|
||||
use crate::llvm_util;
|
||||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
use std::cmp;
|
||||
|
||||
use libc::c_uint;
|
||||
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
|
||||
use rustc_codegen_ssa::mir::place::{PlaceRef, PlaceValue};
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
|
@ -20,11 +14,15 @@ pub use rustc_target::abi::call::*;
|
|||
use rustc_target::abi::{self, HasDataLayout, Int, Size};
|
||||
pub use rustc_target::spec::abi::Abi;
|
||||
use rustc_target::spec::SanitizerSet;
|
||||
|
||||
use libc::c_uint;
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use std::cmp;
|
||||
use crate::builder::Builder;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::llvm::{self, Attribute, AttributePlace};
|
||||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
use crate::{attributes, llvm_util};
|
||||
|
||||
pub trait ArgAttributesExt {
|
||||
fn apply_attrs_to_llfn(&self, idx: AttributePlace, cx: &CodegenCx<'_, '_>, llfn: &Value);
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use crate::attributes;
|
||||
use libc::c_uint;
|
||||
use rustc_ast::expand::allocator::{
|
||||
alloc_error_handler_name, default_fn_name, global_fn_name, AllocatorKind, AllocatorTy,
|
||||
|
@ -8,9 +7,8 @@ use rustc_middle::bug;
|
|||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::config::{DebugInfo, OomStrategy};
|
||||
|
||||
use crate::debuginfo;
|
||||
use crate::llvm::{self, Context, False, Module, True, Type};
|
||||
use crate::ModuleLlvm;
|
||||
use crate::{attributes, debuginfo, ModuleLlvm};
|
||||
|
||||
pub(crate) unsafe fn codegen(
|
||||
tcx: TyCtxt<'_>,
|
||||
|
|
|
@ -1,25 +1,24 @@
|
|||
use crate::attributes;
|
||||
use crate::builder::Builder;
|
||||
use crate::common::Funclet;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::llvm;
|
||||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
|
||||
use libc::{c_char, c_uint};
|
||||
use rustc_ast::{InlineAsmOptions, InlineAsmTemplatePiece};
|
||||
use rustc_codegen_ssa::mir::operand::OperandValue;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_middle::ty::layout::TyAndLayout;
|
||||
use rustc_middle::{bug, span_bug, ty::Instance};
|
||||
use rustc_middle::ty::Instance;
|
||||
use rustc_middle::{bug, span_bug};
|
||||
use rustc_span::{sym, Pos, Span, Symbol};
|
||||
use rustc_target::abi::*;
|
||||
use rustc_target::asm::*;
|
||||
use smallvec::SmallVec;
|
||||
use tracing::debug;
|
||||
|
||||
use libc::{c_char, c_uint};
|
||||
use smallvec::SmallVec;
|
||||
use crate::builder::Builder;
|
||||
use crate::common::Funclet;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
use crate::{attributes, llvm};
|
||||
|
||||
impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
|
||||
fn codegen_inline_asm(
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
//! Set and unset common attributes on LLVM values.
|
||||
|
||||
pub use rustc_attr::{InlineAttr, InstructionSetAttr, OptimizeAttr};
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::middle::codegen_fn_attrs::{CodegenFnAttrFlags, PatchableFunctionEntry};
|
||||
|
@ -9,15 +10,12 @@ use rustc_span::symbol::sym;
|
|||
use rustc_target::spec::{FramePointer, SanitizerSet, StackProbeType, StackProtector};
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use crate::attributes;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::errors::{MissingFeatures, SanitizerMemtagRequiresMte, TargetFeatureDisableOrEnable};
|
||||
use crate::llvm::AttributePlace::Function;
|
||||
use crate::llvm::{self, AllocKindFlags, Attribute, AttributeKind, AttributePlace, MemoryEffects};
|
||||
use crate::llvm_util;
|
||||
pub use rustc_attr::{InlineAttr, InstructionSetAttr, OptimizeAttr};
|
||||
|
||||
use crate::context::CodegenCx;
|
||||
use crate::value::Value;
|
||||
use crate::{attributes, llvm_util};
|
||||
|
||||
pub fn apply_to_llfn(llfn: &Value, idx: AttributePlace, attrs: &[&Attribute]) {
|
||||
if !attrs.is_empty() {
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
//! A helper class for dealing with static archives
|
||||
|
||||
use std::env;
|
||||
use std::ffi::{c_char, c_void, CStr, CString, OsString};
|
||||
use std::io;
|
||||
use std::mem;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::ptr;
|
||||
use std::str;
|
||||
use std::{env, io, mem, ptr, str};
|
||||
|
||||
use rustc_codegen_ssa::back::archive::{
|
||||
try_extract_macho_fat_archive, ArArchiveBuilder, ArchiveBuildFailure, ArchiveBuilder,
|
||||
ArchiveBuilderBuilder, ObjectReader, UnknownArchiveKind, DEFAULT_OBJECT_READER,
|
||||
};
|
||||
use rustc_session::cstore::DllImport;
|
||||
use rustc_session::Session;
|
||||
use tracing::trace;
|
||||
|
||||
use crate::common;
|
||||
use crate::errors::{
|
||||
|
@ -14,14 +18,6 @@ use crate::errors::{
|
|||
};
|
||||
use crate::llvm::archive_ro::{ArchiveRO, Child};
|
||||
use crate::llvm::{self, ArchiveKind, LLVMMachineType, LLVMRustCOFFShortExport};
|
||||
use rustc_codegen_ssa::back::archive::{
|
||||
try_extract_macho_fat_archive, ArArchiveBuilder, ArchiveBuildFailure, ArchiveBuilder,
|
||||
ArchiveBuilderBuilder, ObjectReader, UnknownArchiveKind, DEFAULT_OBJECT_READER,
|
||||
};
|
||||
use tracing::trace;
|
||||
|
||||
use rustc_session::cstore::DllImport;
|
||||
use rustc_session::Session;
|
||||
|
||||
/// Helper for adding many files to an archive.
|
||||
#[must_use = "must call build() to finish building the archive"]
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
use crate::back::write::{
|
||||
self, bitcode_section_name, save_temp_bitcode, CodegenDiagnosticsStage, DiagnosticHandlers,
|
||||
};
|
||||
use crate::errors::{
|
||||
DynamicLinkingWithLTO, LlvmError, LtoBitcodeFromRlib, LtoDisallowed, LtoDylib, LtoProcMacro,
|
||||
};
|
||||
use crate::llvm::{self, build_string};
|
||||
use crate::{LlvmCodegenBackend, ModuleLlvm};
|
||||
use std::collections::BTreeMap;
|
||||
use std::ffi::{CStr, CString};
|
||||
use std::fs::File;
|
||||
use std::mem::ManuallyDrop;
|
||||
use std::path::Path;
|
||||
use std::sync::Arc;
|
||||
use std::{io, iter, slice};
|
||||
|
||||
use object::read::archive::ArchiveFile;
|
||||
use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule, ThinShared};
|
||||
use rustc_codegen_ssa::back::symbol_export;
|
||||
|
@ -22,15 +22,14 @@ use rustc_middle::middle::exported_symbols::{SymbolExportInfo, SymbolExportLevel
|
|||
use rustc_session::config::{self, CrateType, Lto};
|
||||
use tracing::{debug, info};
|
||||
|
||||
use std::collections::BTreeMap;
|
||||
use std::ffi::{CStr, CString};
|
||||
use std::fs::File;
|
||||
use std::io;
|
||||
use std::iter;
|
||||
use std::mem::ManuallyDrop;
|
||||
use std::path::Path;
|
||||
use std::slice;
|
||||
use std::sync::Arc;
|
||||
use crate::back::write::{
|
||||
self, bitcode_section_name, save_temp_bitcode, CodegenDiagnosticsStage, DiagnosticHandlers,
|
||||
};
|
||||
use crate::errors::{
|
||||
DynamicLinkingWithLTO, LlvmError, LtoBitcodeFromRlib, LtoDisallowed, LtoDylib, LtoProcMacro,
|
||||
};
|
||||
use crate::llvm::{self, build_string};
|
||||
use crate::{LlvmCodegenBackend, ModuleLlvm};
|
||||
|
||||
/// We keep track of the computed LTO cache keys from the previous
|
||||
/// session to determine which CGUs we can reuse.
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
use std::{
|
||||
ffi::{c_char, CStr},
|
||||
marker::PhantomData,
|
||||
ops::Deref,
|
||||
ptr::NonNull,
|
||||
};
|
||||
use std::ffi::{c_char, CStr};
|
||||
use std::marker::PhantomData;
|
||||
use std::ops::Deref;
|
||||
use std::ptr::NonNull;
|
||||
|
||||
use rustc_data_structures::small_c_str::SmallCStr;
|
||||
|
||||
use crate::{errors::LlvmError, llvm};
|
||||
use crate::errors::LlvmError;
|
||||
use crate::llvm;
|
||||
|
||||
/// Responsible for safely creating and disposing llvm::TargetMachine via ffi functions.
|
||||
/// Not cloneable as there is no clone function for llvm::TargetMachine.
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
use measureme::{event_id::SEPARATOR_BYTE, EventId, StringComponent, StringId};
|
||||
use rustc_data_structures::profiling::{SelfProfiler, TimingGuard};
|
||||
use std::ffi::{c_void, CStr};
|
||||
use std::os::raw::c_char;
|
||||
use std::sync::Arc;
|
||||
|
||||
use measureme::event_id::SEPARATOR_BYTE;
|
||||
use measureme::{EventId, StringComponent, StringId};
|
||||
use rustc_data_structures::profiling::{SelfProfiler, TimingGuard};
|
||||
|
||||
fn llvm_args_to_string_id(profiler: &SelfProfiler, pass_name: &str, ir_name: &str) -> EventId {
|
||||
let pass_name = profiler.get_or_alloc_cached_string(pass_name);
|
||||
let mut components = vec![StringComponent::Ref(pass_name)];
|
||||
|
|
|
@ -1,19 +1,10 @@
|
|||
use crate::back::lto::ThinBuffer;
|
||||
use crate::back::owned_target_machine::OwnedTargetMachine;
|
||||
use crate::back::profiling::{
|
||||
selfprofile_after_pass_callback, selfprofile_before_pass_callback, LlvmSelfProfiler,
|
||||
};
|
||||
use crate::base;
|
||||
use crate::common;
|
||||
use crate::errors::{
|
||||
CopyBitcode, FromLlvmDiag, FromLlvmOptimizationDiag, LlvmError, UnknownCompression,
|
||||
WithLlvmError, WriteBytecode,
|
||||
};
|
||||
use crate::llvm::{self, DiagnosticInfo, PassManager};
|
||||
use crate::llvm_util;
|
||||
use crate::type_::Type;
|
||||
use crate::LlvmCodegenBackend;
|
||||
use crate::ModuleLlvm;
|
||||
use std::ffi::CString;
|
||||
use std::io::{self, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::Arc;
|
||||
use std::{fs, slice, str};
|
||||
|
||||
use libc::{c_char, c_int, c_void, size_t};
|
||||
use llvm::{
|
||||
LLVMRustLLVMHasZlibCompressionForDebugSymbols, LLVMRustLLVMHasZstdCompressionForDebugSymbols,
|
||||
};
|
||||
|
@ -29,23 +20,28 @@ use rustc_data_structures::small_c_str::SmallCStr;
|
|||
use rustc_errors::{DiagCtxtHandle, FatalError, Level};
|
||||
use rustc_fs_util::{link_or_copy, path_to_c_string};
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use rustc_session::config::{self, Lto, OutputType, Passes};
|
||||
use rustc_session::config::{RemapPathScopeComponents, SplitDwarfKind, SwitchWithOptPath};
|
||||
use rustc_session::config::{
|
||||
self, Lto, OutputType, Passes, RemapPathScopeComponents, SplitDwarfKind, SwitchWithOptPath,
|
||||
};
|
||||
use rustc_session::Session;
|
||||
use rustc_span::symbol::sym;
|
||||
use rustc_span::InnerSpan;
|
||||
use rustc_target::spec::{CodeModel, RelocModel, SanitizerSet, SplitDebuginfo, TlsModel};
|
||||
use tracing::debug;
|
||||
|
||||
use crate::back::lto::ThinBuffer;
|
||||
use crate::back::owned_target_machine::OwnedTargetMachine;
|
||||
use crate::back::profiling::{
|
||||
selfprofile_after_pass_callback, selfprofile_before_pass_callback, LlvmSelfProfiler,
|
||||
};
|
||||
use crate::errors::{
|
||||
CopyBitcode, FromLlvmDiag, FromLlvmOptimizationDiag, LlvmError, UnknownCompression,
|
||||
WithLlvmError, WriteBytecode,
|
||||
};
|
||||
use crate::llvm::diagnostic::OptimizationDiagnosticKind;
|
||||
use libc::{c_char, c_int, c_void, size_t};
|
||||
use std::ffi::CString;
|
||||
use std::fs;
|
||||
use std::io::{self, Write};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::slice;
|
||||
use std::str;
|
||||
use std::sync::Arc;
|
||||
use crate::llvm::{self, DiagnosticInfo, PassManager};
|
||||
use crate::type_::Type;
|
||||
use crate::{base, common, llvm_util, LlvmCodegenBackend, ModuleLlvm};
|
||||
|
||||
pub fn llvm_err<'a>(dcx: DiagCtxtHandle<'_>, err: LlvmError<'a>) -> FatalError {
|
||||
match llvm::last_error() {
|
||||
|
|
|
@ -11,13 +11,7 @@
|
|||
//! [`Ty`]: rustc_middle::ty::Ty
|
||||
//! [`val_ty`]: crate::common::val_ty
|
||||
|
||||
use super::ModuleLlvm;
|
||||
|
||||
use crate::attributes;
|
||||
use crate::builder::Builder;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::llvm;
|
||||
use crate::value::Value;
|
||||
use std::time::Instant;
|
||||
|
||||
use rustc_codegen_ssa::base::maybe_create_entry_wrapper;
|
||||
use rustc_codegen_ssa::mono_item::MonoItemExt;
|
||||
|
@ -32,7 +26,11 @@ use rustc_session::config::DebugInfo;
|
|||
use rustc_span::symbol::Symbol;
|
||||
use rustc_target::spec::SanitizerSet;
|
||||
|
||||
use std::time::Instant;
|
||||
use super::ModuleLlvm;
|
||||
use crate::builder::Builder;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::value::Value;
|
||||
use crate::{attributes, llvm};
|
||||
|
||||
pub struct ValueIter<'ll> {
|
||||
cur: Option<&'ll Value>,
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
use crate::abi::FnAbiLlvmExt;
|
||||
use crate::attributes;
|
||||
use crate::common::Funclet;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::llvm::{self, AtomicOrdering, AtomicRmwBinOp, BasicBlock, False, True};
|
||||
use crate::llvm_util;
|
||||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
use std::borrow::Cow;
|
||||
use std::ops::Deref;
|
||||
use std::{iter, ptr};
|
||||
|
||||
use libc::{c_char, c_uint};
|
||||
use rustc_codegen_ssa::common::{IntPredicate, RealPredicate, SynchronizationScope, TypeKind};
|
||||
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
|
||||
|
@ -23,15 +18,21 @@ use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
|
|||
use rustc_sanitizers::{cfi, kcfi};
|
||||
use rustc_session::config::OptLevel;
|
||||
use rustc_span::Span;
|
||||
use rustc_target::abi::{self, call::FnAbi, Align, Size, WrappingRange};
|
||||
use rustc_target::abi::call::FnAbi;
|
||||
use rustc_target::abi::{self, Align, Size, WrappingRange};
|
||||
use rustc_target::spec::{HasTargetSpec, SanitizerSet, Target};
|
||||
use smallvec::SmallVec;
|
||||
use std::borrow::Cow;
|
||||
use std::iter;
|
||||
use std::ops::Deref;
|
||||
use std::ptr;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use crate::abi::FnAbiLlvmExt;
|
||||
use crate::common::Funclet;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::llvm::{self, AtomicOrdering, AtomicRmwBinOp, BasicBlock, False, True};
|
||||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
use crate::{attributes, llvm_util};
|
||||
|
||||
// All Builders must have an llfn associated with them
|
||||
#[must_use]
|
||||
pub struct Builder<'a, 'll, 'tcx> {
|
||||
|
@ -390,8 +391,9 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
|
|||
lhs: Self::Value,
|
||||
rhs: Self::Value,
|
||||
) -> (Self::Value, Self::Value) {
|
||||
use rustc_middle::ty::IntTy::*;
|
||||
use rustc_middle::ty::UintTy::*;
|
||||
use rustc_middle::ty::{Int, Uint};
|
||||
use rustc_middle::ty::{IntTy::*, UintTy::*};
|
||||
|
||||
let new_kind = match ty.kind() {
|
||||
Int(t @ Isize) => Int(t.normalize(self.tcx.sess.target.pointer_width)),
|
||||
|
|
|
@ -4,16 +4,14 @@
|
|||
//! and methods are represented as just a fn ptr and not a full
|
||||
//! closure.
|
||||
|
||||
use crate::attributes;
|
||||
use crate::common;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::llvm;
|
||||
use crate::value::Value;
|
||||
|
||||
use rustc_middle::ty::layout::{FnAbiOf, HasTyCtxt};
|
||||
use rustc_middle::ty::{self, Instance, TypeVisitableExt};
|
||||
use tracing::debug;
|
||||
|
||||
use crate::context::CodegenCx;
|
||||
use crate::value::Value;
|
||||
use crate::{attributes, common, llvm};
|
||||
|
||||
/// Codegens a reference to a fn/method item, monomorphizing and
|
||||
/// inlining as it goes.
|
||||
///
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
//! Code that is useful in various codegen modules.
|
||||
|
||||
use crate::consts::const_alloc_to_llvm;
|
||||
pub use crate::context::CodegenCx;
|
||||
use crate::llvm::{self, BasicBlock, Bool, ConstantInt, False, OperandBundleDef, True};
|
||||
use crate::type_::Type;
|
||||
use crate::value::Value;
|
||||
use std::fmt::Write;
|
||||
|
||||
use libc::{c_char, c_uint};
|
||||
use rustc_ast::Mutability;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_data_structures::stable_hasher::{Hash128, HashStable, StableHasher};
|
||||
|
@ -16,11 +13,14 @@ use rustc_middle::ty::TyCtxt;
|
|||
use rustc_session::cstore::{DllCallingConvention, DllImport, PeImportNameType};
|
||||
use rustc_target::abi::{self, AddressSpace, HasDataLayout, Pointer};
|
||||
use rustc_target::spec::Target;
|
||||
|
||||
use libc::{c_char, c_uint};
|
||||
use std::fmt::Write;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::consts::const_alloc_to_llvm;
|
||||
pub use crate::context::CodegenCx;
|
||||
use crate::llvm::{self, BasicBlock, Bool, ConstantInt, False, OperandBundleDef, True};
|
||||
use crate::type_::Type;
|
||||
use crate::value::Value;
|
||||
|
||||
/*
|
||||
* A note on nomenclature of linking: "extern", "foreign", and "upcall".
|
||||
*
|
||||
|
|
|
@ -1,13 +1,5 @@
|
|||
use crate::base;
|
||||
use crate::common::{self, CodegenCx};
|
||||
use crate::debuginfo;
|
||||
use crate::errors::{
|
||||
InvalidMinimumAlignmentNotPowerOfTwo, InvalidMinimumAlignmentTooLarge, SymbolAlreadyDefined,
|
||||
};
|
||||
use crate::llvm::{self, True};
|
||||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
use std::ops::Range;
|
||||
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
@ -24,9 +16,18 @@ use rustc_session::config::Lto;
|
|||
use rustc_target::abi::{
|
||||
Align, AlignFromBytesError, HasDataLayout, Primitive, Scalar, Size, WrappingRange,
|
||||
};
|
||||
use std::ops::Range;
|
||||
use tracing::{debug, instrument, trace};
|
||||
|
||||
use crate::common::{self, CodegenCx};
|
||||
use crate::errors::{
|
||||
InvalidMinimumAlignmentNotPowerOfTwo, InvalidMinimumAlignmentTooLarge, SymbolAlreadyDefined,
|
||||
};
|
||||
use crate::llvm::{self, True};
|
||||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
use crate::{base, debuginfo};
|
||||
|
||||
pub fn const_alloc_to_llvm<'ll>(
|
||||
cx: &CodegenCx<'ll, '_>,
|
||||
alloc: ConstAllocation<'_>,
|
||||
|
|
|
@ -1,19 +1,13 @@
|
|||
use crate::attributes;
|
||||
use crate::back::write::to_llvm_code_model;
|
||||
use crate::callee::get_fn;
|
||||
use crate::coverageinfo;
|
||||
use crate::debuginfo;
|
||||
use crate::debuginfo::metadata::apply_vcall_visibility_metadata;
|
||||
use crate::llvm;
|
||||
use crate::llvm_util;
|
||||
use crate::type_::Type;
|
||||
use crate::value::Value;
|
||||
use std::borrow::Borrow;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::ffi::CStr;
|
||||
use std::str;
|
||||
|
||||
use libc::c_uint;
|
||||
use rustc_codegen_ssa::base::{wants_msvc_seh, wants_wasm_eh};
|
||||
use rustc_codegen_ssa::errors as ssa_errors;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_data_structures::base_n::ToBaseN;
|
||||
use rustc_data_structures::base_n::ALPHANUMERIC_ONLY;
|
||||
use rustc_data_structures::base_n::{ToBaseN, ALPHANUMERIC_ONLY};
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::small_c_str::SmallCStr;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
@ -24,20 +18,23 @@ use rustc_middle::ty::layout::{
|
|||
};
|
||||
use rustc_middle::ty::{self, Instance, Ty, TyCtxt};
|
||||
use rustc_middle::{bug, span_bug};
|
||||
use rustc_session::config::{BranchProtection, CFGuard, CFProtection};
|
||||
use rustc_session::config::{CrateType, DebugInfo, PAuthKey, PacRet};
|
||||
use rustc_session::config::{
|
||||
BranchProtection, CFGuard, CFProtection, CrateType, DebugInfo, PAuthKey, PacRet,
|
||||
};
|
||||
use rustc_session::Session;
|
||||
use rustc_span::source_map::Spanned;
|
||||
use rustc_span::{Span, DUMMY_SP};
|
||||
use rustc_target::abi::{call::FnAbi, HasDataLayout, TargetDataLayout, VariantIdx};
|
||||
use rustc_target::abi::call::FnAbi;
|
||||
use rustc_target::abi::{HasDataLayout, TargetDataLayout, VariantIdx};
|
||||
use rustc_target::spec::{HasTargetSpec, RelocModel, Target, TlsModel};
|
||||
use smallvec::SmallVec;
|
||||
|
||||
use libc::c_uint;
|
||||
use std::borrow::Borrow;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::ffi::CStr;
|
||||
use std::str;
|
||||
use crate::back::write::to_llvm_code_model;
|
||||
use crate::callee::get_fn;
|
||||
use crate::debuginfo::metadata::apply_vcall_visibility_metadata;
|
||||
use crate::type_::Type;
|
||||
use crate::value::Value;
|
||||
use crate::{attributes, coverageinfo, debuginfo, llvm, llvm_util};
|
||||
|
||||
/// There is one `CodegenCx` per compilation unit. Each one has its own LLVM
|
||||
/// `llvm::Context` so that several compilation units may be optimized in parallel.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use crate::coverageinfo::ffi::{Counter, CounterExpression, ExprKind};
|
||||
|
||||
use rustc_data_structures::captures::Captures;
|
||||
use rustc_data_structures::fx::FxIndexSet;
|
||||
use rustc_index::bit_set::BitSet;
|
||||
|
@ -11,6 +9,8 @@ use rustc_middle::ty::Instance;
|
|||
use rustc_span::Symbol;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use crate::coverageinfo::ffi::{Counter, CounterExpression, ExprKind};
|
||||
|
||||
/// Holds all of the coverage mapping data associated with a function instance,
|
||||
/// collected during traversal of `Coverage` statements in the function's MIR.
|
||||
#[derive(Debug)]
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
use crate::common::CodegenCx;
|
||||
use crate::coverageinfo;
|
||||
use crate::coverageinfo::ffi::CounterMappingRegion;
|
||||
use crate::coverageinfo::map_data::{FunctionCoverage, FunctionCoverageCollector};
|
||||
use crate::llvm;
|
||||
|
||||
use itertools::Itertools as _;
|
||||
use rustc_codegen_ssa::traits::{BaseTypeMethods, ConstMethods};
|
||||
use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet};
|
||||
use rustc_hir::def_id::{DefId, LocalDefId};
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::{self, TyCtxt};
|
||||
use rustc_middle::{bug, mir};
|
||||
use rustc_span::def_id::DefIdSet;
|
||||
use rustc_span::Symbol;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::common::CodegenCx;
|
||||
use crate::coverageinfo::ffi::CounterMappingRegion;
|
||||
use crate::coverageinfo::map_data::{FunctionCoverage, FunctionCoverageCollector};
|
||||
use crate::{coverageinfo, llvm};
|
||||
|
||||
/// Generates and exports the Coverage Map.
|
||||
///
|
||||
/// Rust Coverage Map generation supports LLVM Coverage Mapping Format versions
|
||||
|
|
|
@ -1,9 +1,4 @@
|
|||
use crate::llvm;
|
||||
|
||||
use crate::builder::Builder;
|
||||
use crate::common::CodegenCx;
|
||||
use crate::coverageinfo::ffi::{CounterExpression, CounterMappingRegion};
|
||||
use crate::coverageinfo::map_data::FunctionCoverageCollector;
|
||||
use std::cell::RefCell;
|
||||
|
||||
use libc::c_uint;
|
||||
use rustc_codegen_ssa::traits::{
|
||||
|
@ -19,7 +14,11 @@ use rustc_middle::ty::Instance;
|
|||
use rustc_target::abi::{Align, Size};
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use std::cell::RefCell;
|
||||
use crate::builder::Builder;
|
||||
use crate::common::CodegenCx;
|
||||
use crate::coverageinfo::ffi::{CounterExpression, CounterMappingRegion};
|
||||
use crate::coverageinfo::map_data::FunctionCoverageCollector;
|
||||
use crate::llvm;
|
||||
|
||||
pub(crate) mod ffi;
|
||||
pub(crate) mod map_data;
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
use super::metadata::file_metadata;
|
||||
use super::utils::DIB;
|
||||
use rustc_codegen_ssa::mir::debuginfo::{DebugScope, FunctionDebugContext};
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
|
||||
use crate::common::CodegenCx;
|
||||
use crate::llvm;
|
||||
use crate::llvm::debuginfo::{DILocation, DIScope};
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::Idx;
|
||||
use rustc_middle::mir::{Body, SourceScope};
|
||||
use rustc_middle::ty::layout::FnAbiOf;
|
||||
use rustc_middle::ty::{self, Instance};
|
||||
use rustc_session::config::DebugInfo;
|
||||
|
||||
use rustc_index::bit_set::BitSet;
|
||||
use rustc_index::Idx;
|
||||
use super::metadata::file_metadata;
|
||||
use super::utils::DIB;
|
||||
use crate::common::CodegenCx;
|
||||
use crate::llvm;
|
||||
use crate::llvm::debuginfo::{DILocation, DIScope};
|
||||
|
||||
/// Produces DIScope DIEs for each MIR Scope which has variables defined in it.
|
||||
// FIXME(eddyb) almost all of this should be in `rustc_codegen_ssa::mir::debuginfo`.
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
// .debug_gdb_scripts binary section.
|
||||
|
||||
use crate::llvm;
|
||||
|
||||
use crate::builder::Builder;
|
||||
use crate::common::CodegenCx;
|
||||
use crate::value::Value;
|
||||
use rustc_ast::attr;
|
||||
use rustc_codegen_ssa::base::collect_debugger_visualizers_transitive;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_hir::def_id::LOCAL_CRATE;
|
||||
use rustc_middle::{bug, middle::debugger_visualizer::DebuggerVisualizerType};
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::middle::debugger_visualizer::DebuggerVisualizerType;
|
||||
use rustc_session::config::{CrateType, DebugInfo};
|
||||
use rustc_span::symbol::sym;
|
||||
|
||||
use crate::builder::Builder;
|
||||
use crate::common::CodegenCx;
|
||||
use crate::llvm;
|
||||
use crate::value::Value;
|
||||
|
||||
/// Inserts a side-effect free instruction sequence that makes sure that the
|
||||
/// .debug_gdb_scripts global is referenced, so it isn't removed by the linker.
|
||||
pub fn insert_reference_to_gdb_debug_scripts_section_global(bx: &mut Builder<'_, '_, '_>) {
|
||||
|
|
|
@ -1,32 +1,14 @@
|
|||
use self::type_map::DINodeCreationResult;
|
||||
use self::type_map::Stub;
|
||||
use self::type_map::UniqueTypeId;
|
||||
use std::borrow::Cow;
|
||||
use std::fmt::{self, Write};
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::{iter, ptr};
|
||||
|
||||
use super::namespace::mangled_name_of_instance;
|
||||
use super::type_names::{compute_debuginfo_type_name, compute_debuginfo_vtable_name};
|
||||
use super::utils::{
|
||||
create_DIArray, debug_context, get_namespace_for_item, is_node_local_to_unit, DIB,
|
||||
};
|
||||
use super::CodegenUnitDebugContext;
|
||||
|
||||
use crate::abi;
|
||||
use crate::common::CodegenCx;
|
||||
use crate::debuginfo::metadata::type_map::build_type_with_children;
|
||||
use crate::debuginfo::utils::fat_pointer_kind;
|
||||
use crate::debuginfo::utils::FatPtrKind;
|
||||
use crate::llvm;
|
||||
use crate::llvm::debuginfo::{
|
||||
DIDescriptor, DIFile, DIFlags, DILexicalBlock, DIScope, DIType, DebugEmissionKind,
|
||||
DebugNameTableKind,
|
||||
};
|
||||
use crate::value::Value;
|
||||
|
||||
use rustc_codegen_ssa::debuginfo::type_names::cpp_like_debuginfo;
|
||||
use rustc_codegen_ssa::debuginfo::type_names::VTableNameKind;
|
||||
use libc::{c_char, c_longlong, c_uint};
|
||||
use rustc_codegen_ssa::debuginfo::type_names::{cpp_like_debuginfo, VTableNameKind};
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_fs_util::path_to_c_string;
|
||||
use rustc_hir::def::CtorKind;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def::{CtorKind, DefKind};
|
||||
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
|
||||
|
@ -36,21 +18,29 @@ use rustc_middle::ty::{
|
|||
};
|
||||
use rustc_session::config::{self, DebugInfo, Lto};
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::{hygiene, FileName, DUMMY_SP};
|
||||
use rustc_span::{FileNameDisplayPreference, SourceFile};
|
||||
use rustc_span::{hygiene, FileName, FileNameDisplayPreference, SourceFile, DUMMY_SP};
|
||||
use rustc_symbol_mangling::typeid_for_trait_ref;
|
||||
use rustc_target::abi::{Align, Size};
|
||||
use rustc_target::spec::DebuginfoKind;
|
||||
use smallvec::smallvec;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
use libc::{c_char, c_longlong, c_uint};
|
||||
use std::borrow::Cow;
|
||||
use std::fmt::{self, Write};
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::iter;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::ptr;
|
||||
use self::type_map::{DINodeCreationResult, Stub, UniqueTypeId};
|
||||
use super::namespace::mangled_name_of_instance;
|
||||
use super::type_names::{compute_debuginfo_type_name, compute_debuginfo_vtable_name};
|
||||
use super::utils::{
|
||||
create_DIArray, debug_context, get_namespace_for_item, is_node_local_to_unit, DIB,
|
||||
};
|
||||
use super::CodegenUnitDebugContext;
|
||||
use crate::common::CodegenCx;
|
||||
use crate::debuginfo::metadata::type_map::build_type_with_children;
|
||||
use crate::debuginfo::utils::{fat_pointer_kind, FatPtrKind};
|
||||
use crate::llvm::debuginfo::{
|
||||
DIDescriptor, DIFile, DIFlags, DILexicalBlock, DIScope, DIType, DebugEmissionKind,
|
||||
DebugNameTableKind,
|
||||
};
|
||||
use crate::value::Value;
|
||||
use crate::{abi, llvm};
|
||||
|
||||
impl PartialEq for llvm::Metadata {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
|
@ -874,7 +864,8 @@ pub fn build_compile_unit_di_node<'ll, 'tcx>(
|
|||
codegen_unit_name: &str,
|
||||
debug_context: &CodegenUnitDebugContext<'ll, 'tcx>,
|
||||
) -> &'ll DIDescriptor {
|
||||
use rustc_session::{config::RemapPathScopeComponents, RemapFileNameExt};
|
||||
use rustc_session::config::RemapPathScopeComponents;
|
||||
use rustc_session::RemapFileNameExt;
|
||||
let mut name_in_debuginfo = tcx
|
||||
.sess
|
||||
.local_crate_source_file()
|
||||
|
|
|
@ -1,41 +1,27 @@
|
|||
use std::borrow::Cow;
|
||||
|
||||
use libc::c_uint;
|
||||
use rustc_codegen_ssa::{
|
||||
debuginfo::{type_names::compute_debuginfo_type_name, wants_c_like_enum_debuginfo},
|
||||
traits::ConstMethods,
|
||||
};
|
||||
|
||||
use rustc_codegen_ssa::debuginfo::type_names::compute_debuginfo_type_name;
|
||||
use rustc_codegen_ssa::debuginfo::wants_c_like_enum_debuginfo;
|
||||
use rustc_codegen_ssa::traits::ConstMethods;
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_middle::{
|
||||
bug,
|
||||
ty::{
|
||||
self,
|
||||
layout::{LayoutOf, TyAndLayout},
|
||||
AdtDef, CoroutineArgs, CoroutineArgsExt, Ty,
|
||||
},
|
||||
};
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
|
||||
use rustc_middle::ty::{self, AdtDef, CoroutineArgs, CoroutineArgsExt, Ty};
|
||||
use rustc_target::abi::{Align, Endian, Size, TagEncoding, VariantIdx, Variants};
|
||||
use smallvec::smallvec;
|
||||
|
||||
use crate::{
|
||||
common::CodegenCx,
|
||||
debuginfo::{
|
||||
metadata::{
|
||||
build_field_di_node,
|
||||
enums::{tag_base_type, DiscrResult},
|
||||
file_metadata, size_and_align_of, type_di_node,
|
||||
type_map::{self, Stub, UniqueTypeId},
|
||||
unknown_file_metadata, visibility_di_flags, DINodeCreationResult, SmallVec,
|
||||
NO_GENERICS, NO_SCOPE_METADATA, UNKNOWN_LINE_NUMBER,
|
||||
},
|
||||
utils::DIB,
|
||||
},
|
||||
llvm::{
|
||||
self,
|
||||
debuginfo::{DIFile, DIFlags, DIType},
|
||||
},
|
||||
use crate::common::CodegenCx;
|
||||
use crate::debuginfo::metadata::enums::{tag_base_type, DiscrResult};
|
||||
use crate::debuginfo::metadata::type_map::{self, Stub, UniqueTypeId};
|
||||
use crate::debuginfo::metadata::{
|
||||
build_field_di_node, file_metadata, size_and_align_of, type_di_node, unknown_file_metadata,
|
||||
visibility_di_flags, DINodeCreationResult, SmallVec, NO_GENERICS, NO_SCOPE_METADATA,
|
||||
UNKNOWN_LINE_NUMBER,
|
||||
};
|
||||
use crate::debuginfo::utils::DIB;
|
||||
use crate::llvm::debuginfo::{DIFile, DIFlags, DIType};
|
||||
use crate::llvm::{self};
|
||||
|
||||
// The names of the associated constants in each variant wrapper struct.
|
||||
// These have to match up with the names being used in `intrinsic.natvis`.
|
||||
|
|
|
@ -1,45 +1,29 @@
|
|||
use rustc_codegen_ssa::debuginfo::{
|
||||
type_names::{compute_debuginfo_type_name, cpp_like_debuginfo},
|
||||
wants_c_like_enum_debuginfo,
|
||||
};
|
||||
use std::borrow::Cow;
|
||||
|
||||
use rustc_codegen_ssa::debuginfo::type_names::{compute_debuginfo_type_name, cpp_like_debuginfo};
|
||||
use rustc_codegen_ssa::debuginfo::wants_c_like_enum_debuginfo;
|
||||
use rustc_hir::def::CtorKind;
|
||||
use rustc_index::IndexSlice;
|
||||
use rustc_middle::{
|
||||
bug,
|
||||
mir::CoroutineLayout,
|
||||
ty::{
|
||||
self,
|
||||
layout::{IntegerExt, LayoutOf, PrimitiveExt, TyAndLayout},
|
||||
AdtDef, CoroutineArgs, CoroutineArgsExt, Ty, VariantDef,
|
||||
},
|
||||
};
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::mir::CoroutineLayout;
|
||||
use rustc_middle::ty::layout::{IntegerExt, LayoutOf, PrimitiveExt, TyAndLayout};
|
||||
use rustc_middle::ty::{self, AdtDef, CoroutineArgs, CoroutineArgsExt, Ty, VariantDef};
|
||||
use rustc_span::Symbol;
|
||||
use rustc_target::abi::{
|
||||
FieldIdx, HasDataLayout, Integer, Primitive, TagEncoding, VariantIdx, Variants,
|
||||
};
|
||||
use std::borrow::Cow;
|
||||
|
||||
use crate::{
|
||||
common::CodegenCx,
|
||||
debuginfo::{
|
||||
metadata::{
|
||||
build_field_di_node, build_generic_type_param_di_nodes, type_di_node,
|
||||
type_map::{self, Stub},
|
||||
unknown_file_metadata, UNKNOWN_LINE_NUMBER,
|
||||
},
|
||||
utils::{create_DIArray, get_namespace_for_item, DIB},
|
||||
},
|
||||
llvm::{
|
||||
self,
|
||||
debuginfo::{DIFlags, DIType},
|
||||
},
|
||||
};
|
||||
|
||||
use super::{
|
||||
size_and_align_of,
|
||||
type_map::{DINodeCreationResult, UniqueTypeId},
|
||||
SmallVec,
|
||||
use super::type_map::{DINodeCreationResult, UniqueTypeId};
|
||||
use super::{size_and_align_of, SmallVec};
|
||||
use crate::common::CodegenCx;
|
||||
use crate::debuginfo::metadata::type_map::{self, Stub};
|
||||
use crate::debuginfo::metadata::{
|
||||
build_field_di_node, build_generic_type_param_di_nodes, type_di_node, unknown_file_metadata,
|
||||
UNKNOWN_LINE_NUMBER,
|
||||
};
|
||||
use crate::debuginfo::utils::{create_DIArray, get_namespace_for_item, DIB};
|
||||
use crate::llvm::debuginfo::{DIFlags, DIType};
|
||||
use crate::llvm::{self};
|
||||
|
||||
mod cpp_like;
|
||||
mod native;
|
||||
|
|
|
@ -1,37 +1,26 @@
|
|||
use std::borrow::Cow;
|
||||
|
||||
use crate::{
|
||||
common::CodegenCx,
|
||||
debuginfo::{
|
||||
metadata::{
|
||||
enums::tag_base_type,
|
||||
file_metadata, size_and_align_of, type_di_node,
|
||||
type_map::{self, Stub, StubInfo, UniqueTypeId},
|
||||
unknown_file_metadata, visibility_di_flags, DINodeCreationResult, SmallVec,
|
||||
NO_GENERICS, UNKNOWN_LINE_NUMBER,
|
||||
},
|
||||
utils::{create_DIArray, get_namespace_for_item, DIB},
|
||||
},
|
||||
llvm::{
|
||||
self,
|
||||
debuginfo::{DIFile, DIFlags, DIType},
|
||||
},
|
||||
};
|
||||
use libc::c_uint;
|
||||
use rustc_codegen_ssa::{
|
||||
debuginfo::{type_names::compute_debuginfo_type_name, wants_c_like_enum_debuginfo},
|
||||
traits::ConstMethods,
|
||||
};
|
||||
use rustc_middle::{
|
||||
bug,
|
||||
ty::{
|
||||
self,
|
||||
layout::{LayoutOf, TyAndLayout},
|
||||
},
|
||||
};
|
||||
use rustc_codegen_ssa::debuginfo::type_names::compute_debuginfo_type_name;
|
||||
use rustc_codegen_ssa::debuginfo::wants_c_like_enum_debuginfo;
|
||||
use rustc_codegen_ssa::traits::ConstMethods;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
|
||||
use rustc_middle::ty::{self};
|
||||
use rustc_target::abi::{Size, TagEncoding, VariantIdx, Variants};
|
||||
use smallvec::smallvec;
|
||||
|
||||
use crate::common::CodegenCx;
|
||||
use crate::debuginfo::metadata::enums::tag_base_type;
|
||||
use crate::debuginfo::metadata::type_map::{self, Stub, StubInfo, UniqueTypeId};
|
||||
use crate::debuginfo::metadata::{
|
||||
file_metadata, size_and_align_of, type_di_node, unknown_file_metadata, visibility_di_flags,
|
||||
DINodeCreationResult, SmallVec, NO_GENERICS, UNKNOWN_LINE_NUMBER,
|
||||
};
|
||||
use crate::debuginfo::utils::{create_DIArray, get_namespace_for_item, DIB};
|
||||
use crate::llvm::debuginfo::{DIFile, DIFlags, DIType};
|
||||
use crate::llvm::{self};
|
||||
|
||||
/// Build the debuginfo node for an enum type. The listing below shows how such a
|
||||
/// type looks like at the LLVM IR/DWARF level. It is a `DW_TAG_structure_type`
|
||||
/// with a single `DW_TAG_variant_part` that in turn contains a `DW_TAG_variant`
|
||||
|
|
|
@ -1,27 +1,18 @@
|
|||
use std::cell::RefCell;
|
||||
|
||||
use rustc_data_structures::{
|
||||
fingerprint::Fingerprint,
|
||||
fx::FxHashMap,
|
||||
stable_hasher::{HashStable, StableHasher},
|
||||
};
|
||||
use rustc_data_structures::fingerprint::Fingerprint;
|
||||
use rustc_data_structures::fx::FxHashMap;
|
||||
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
|
||||
use rustc_macros::HashStable;
|
||||
use rustc_middle::{
|
||||
bug,
|
||||
ty::{ParamEnv, PolyExistentialTraitRef, Ty, TyCtxt},
|
||||
};
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::ty::{ParamEnv, PolyExistentialTraitRef, Ty, TyCtxt};
|
||||
use rustc_target::abi::{Align, Size, VariantIdx};
|
||||
|
||||
use crate::{
|
||||
common::CodegenCx,
|
||||
debuginfo::utils::{create_DIArray, debug_context, DIB},
|
||||
llvm::{
|
||||
self,
|
||||
debuginfo::{DIFlags, DIScope, DIType},
|
||||
},
|
||||
};
|
||||
|
||||
use super::{unknown_file_metadata, SmallVec, UNKNOWN_LINE_NUMBER};
|
||||
use crate::common::CodegenCx;
|
||||
use crate::debuginfo::utils::{create_DIArray, debug_context, DIB};
|
||||
use crate::llvm::debuginfo::{DIFlags, DIScope, DIType};
|
||||
use crate::llvm::{self};
|
||||
|
||||
mod private {
|
||||
use rustc_macros::HashStable;
|
||||
|
|
|
@ -1,13 +1,34 @@
|
|||
#![doc = include_str!("doc.md")]
|
||||
|
||||
use rustc_codegen_ssa::mir::debuginfo::VariableKind::*;
|
||||
use rustc_data_structures::unord::UnordMap;
|
||||
use std::cell::{OnceCell, RefCell};
|
||||
use std::iter;
|
||||
use std::ops::Range;
|
||||
|
||||
use self::metadata::{file_metadata, type_di_node};
|
||||
use self::metadata::{UNKNOWN_COLUMN_NUMBER, UNKNOWN_LINE_NUMBER};
|
||||
use libc::c_uint;
|
||||
use rustc_codegen_ssa::debuginfo::type_names;
|
||||
use rustc_codegen_ssa::mir::debuginfo::VariableKind::*;
|
||||
use rustc_codegen_ssa::mir::debuginfo::{DebugScope, FunctionDebugContext, VariableKind};
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_data_structures::unord::UnordMap;
|
||||
use rustc_hir::def_id::{DefId, DefIdMap};
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::layout::LayoutOf;
|
||||
use rustc_middle::ty::{self, GenericArgsRef, Instance, ParamEnv, Ty, TypeVisitableExt};
|
||||
use rustc_session::config::{self, DebugInfo};
|
||||
use rustc_session::Session;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::{
|
||||
BytePos, Pos, SourceFile, SourceFileAndLine, SourceFileHash, Span, StableSourceFileId,
|
||||
};
|
||||
use rustc_target::abi::Size;
|
||||
use smallvec::SmallVec;
|
||||
use tracing::debug;
|
||||
|
||||
use self::metadata::{file_metadata, type_di_node, UNKNOWN_COLUMN_NUMBER, UNKNOWN_LINE_NUMBER};
|
||||
use self::namespace::mangled_name_of_instance;
|
||||
use self::utils::{create_DIArray, is_node_local_to_unit, DIB};
|
||||
|
||||
use crate::abi::FnAbi;
|
||||
use crate::builder::Builder;
|
||||
use crate::common::CodegenCx;
|
||||
|
@ -18,32 +39,6 @@ use crate::llvm::debuginfo::{
|
|||
};
|
||||
use crate::value::Value;
|
||||
|
||||
use rustc_codegen_ssa::debuginfo::type_names;
|
||||
use rustc_codegen_ssa::mir::debuginfo::{DebugScope, FunctionDebugContext, VariableKind};
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_data_structures::sync::Lrc;
|
||||
use rustc_hir::def_id::{DefId, DefIdMap};
|
||||
use rustc_index::IndexVec;
|
||||
use rustc_middle::mir;
|
||||
use rustc_middle::ty::layout::LayoutOf;
|
||||
use rustc_middle::ty::GenericArgsRef;
|
||||
use rustc_middle::ty::{self, Instance, ParamEnv, Ty, TypeVisitableExt};
|
||||
use rustc_session::config::{self, DebugInfo};
|
||||
use rustc_session::Session;
|
||||
use rustc_span::symbol::Symbol;
|
||||
use rustc_span::{
|
||||
BytePos, Pos, SourceFile, SourceFileAndLine, SourceFileHash, Span, StableSourceFileId,
|
||||
};
|
||||
use rustc_target::abi::Size;
|
||||
|
||||
use libc::c_uint;
|
||||
use smallvec::SmallVec;
|
||||
use std::cell::OnceCell;
|
||||
use std::cell::RefCell;
|
||||
use std::iter;
|
||||
use std::ops::Range;
|
||||
use tracing::debug;
|
||||
|
||||
mod create_scope_map;
|
||||
pub mod gdb;
|
||||
pub mod metadata;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
// Namespace Handling.
|
||||
|
||||
use super::utils::{debug_context, DIB};
|
||||
use rustc_codegen_ssa::debuginfo::type_names;
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::{self, Instance};
|
||||
|
||||
use super::utils::{debug_context, DIB};
|
||||
use crate::common::CodegenCx;
|
||||
use crate::llvm;
|
||||
use crate::llvm::debuginfo::DIScope;
|
||||
use rustc_hir::def_id::DefId;
|
||||
|
||||
pub fn mangled_name_of_instance<'a, 'tcx>(
|
||||
cx: &CodegenCx<'a, 'tcx>,
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
// Utility Functions.
|
||||
|
||||
use super::namespace::item_namespace;
|
||||
use super::CodegenUnitDebugContext;
|
||||
|
||||
use rustc_hir::def_id::DefId;
|
||||
use rustc_middle::ty::layout::{HasParamEnv, LayoutOf};
|
||||
use rustc_middle::ty::{self, Ty};
|
||||
use tracing::trace;
|
||||
|
||||
use super::namespace::item_namespace;
|
||||
use super::CodegenUnitDebugContext;
|
||||
use crate::common::CodegenCx;
|
||||
use crate::llvm;
|
||||
use crate::llvm::debuginfo::{DIArray, DIBuilder, DIDescriptor, DIScope};
|
||||
|
|
|
@ -11,13 +11,6 @@
|
|||
//! * Use define_* family of methods when you might be defining the Value.
|
||||
//! * When in doubt, define.
|
||||
|
||||
use crate::abi::{FnAbi, FnAbiLlvmExt};
|
||||
use crate::attributes;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::llvm;
|
||||
use crate::llvm::AttributePlace::Function;
|
||||
use crate::type_::Type;
|
||||
use crate::value::Value;
|
||||
use itertools::Itertools;
|
||||
use rustc_codegen_ssa::traits::TypeMembershipMethods;
|
||||
use rustc_data_structures::fx::FxIndexSet;
|
||||
|
@ -26,6 +19,13 @@ use rustc_sanitizers::{cfi, kcfi};
|
|||
use smallvec::SmallVec;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::abi::{FnAbi, FnAbiLlvmExt};
|
||||
use crate::context::CodegenCx;
|
||||
use crate::llvm::AttributePlace::Function;
|
||||
use crate::type_::Type;
|
||||
use crate::value::Value;
|
||||
use crate::{attributes, llvm};
|
||||
|
||||
/// Declare a function.
|
||||
///
|
||||
/// If there’s a value with the same name already declared, the function will
|
||||
|
|
|
@ -2,12 +2,13 @@ use std::borrow::Cow;
|
|||
use std::ffi::CString;
|
||||
use std::path::Path;
|
||||
|
||||
use crate::fluent_generated as fluent;
|
||||
use rustc_data_structures::small_c_str::SmallCStr;
|
||||
use rustc_errors::{Diag, DiagCtxtHandle, Diagnostic, EmissionGuarantee, Level};
|
||||
use rustc_macros::{Diagnostic, Subdiagnostic};
|
||||
use rustc_span::Span;
|
||||
|
||||
use crate::fluent_generated as fluent;
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(codegen_llvm_unknown_ctarget_feature_prefix)]
|
||||
#[note]
|
||||
|
|
|
@ -1,11 +1,4 @@
|
|||
use crate::abi::{Abi, FnAbi, FnAbiLlvmExt, LlvmType, PassMode};
|
||||
use crate::builder::Builder;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::llvm;
|
||||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::va_arg::emit_va_arg;
|
||||
use crate::value::Value;
|
||||
use std::cmp::Ordering;
|
||||
|
||||
use rustc_codegen_ssa::base::{compare_simd_types, wants_msvc_seh, wants_wasm_eh};
|
||||
use rustc_codegen_ssa::common::{IntPredicate, TypeKind};
|
||||
|
@ -23,7 +16,14 @@ use rustc_target::abi::{self, Align, Float, HasDataLayout, Primitive, Size};
|
|||
use rustc_target::spec::{HasTargetSpec, PanicStrategy};
|
||||
use tracing::debug;
|
||||
|
||||
use std::cmp::Ordering;
|
||||
use crate::abi::{Abi, FnAbi, FnAbiLlvmExt, LlvmType, PassMode};
|
||||
use crate::builder::Builder;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::llvm;
|
||||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::va_arg::emit_va_arg;
|
||||
use crate::value::Value;
|
||||
|
||||
fn get_simple_intrinsic<'ll>(
|
||||
cx: &CodegenCx<'ll, '_>,
|
||||
|
|
|
@ -17,9 +17,13 @@
|
|||
#![feature(rustdoc_internals)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
use std::any::Any;
|
||||
use std::ffi::CStr;
|
||||
use std::io::Write;
|
||||
use std::mem::ManuallyDrop;
|
||||
|
||||
use back::owned_target_machine::OwnedTargetMachine;
|
||||
use back::write::{create_informational_target_machine, create_target_machine};
|
||||
|
||||
use errors::ParseTargetMachineConfig;
|
||||
pub use llvm_util::target_features;
|
||||
use rustc_ast::expand::allocator::AllocatorKind;
|
||||
|
@ -28,8 +32,7 @@ use rustc_codegen_ssa::back::write::{
|
|||
CodegenContext, FatLtoInput, ModuleConfig, TargetMachineFactoryConfig, TargetMachineFactoryFn,
|
||||
};
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_codegen_ssa::ModuleCodegen;
|
||||
use rustc_codegen_ssa::{CodegenResults, CompiledModule};
|
||||
use rustc_codegen_ssa::{CodegenResults, CompiledModule, ModuleCodegen};
|
||||
use rustc_data_structures::fx::FxIndexMap;
|
||||
use rustc_errors::{DiagCtxtHandle, ErrorGuaranteed, FatalError};
|
||||
use rustc_metadata::EncodedMetadata;
|
||||
|
@ -40,11 +43,6 @@ use rustc_session::config::{OptLevel, OutputFilenames, PrintKind, PrintRequest};
|
|||
use rustc_session::Session;
|
||||
use rustc_span::symbol::Symbol;
|
||||
|
||||
use std::any::Any;
|
||||
use std::ffi::CStr;
|
||||
use std::io::Write;
|
||||
use std::mem::ManuallyDrop;
|
||||
|
||||
mod back {
|
||||
pub mod archive;
|
||||
pub mod lto;
|
||||
|
@ -394,9 +392,10 @@ impl CodegenBackend for LlvmCodegenBackend {
|
|||
codegen_results: CodegenResults,
|
||||
outputs: &OutputFilenames,
|
||||
) -> Result<(), ErrorGuaranteed> {
|
||||
use crate::back::archive::LlvmArchiveBuilderBuilder;
|
||||
use rustc_codegen_ssa::back::link::link_binary;
|
||||
|
||||
use crate::back::archive::LlvmArchiveBuilderBuilder;
|
||||
|
||||
// Run the linker on any artifacts that resulted from the LLVM run.
|
||||
// This should produce either a finished executable or library.
|
||||
link_binary(sess, &LlvmArchiveBuilderBuilder, &codegen_results, outputs)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
//! A wrapper around LLVM's archive (.a) code
|
||||
|
||||
use rustc_fs_util::path_to_c_string;
|
||||
use std::path::Path;
|
||||
use std::slice;
|
||||
use std::str;
|
||||
use std::{slice, str};
|
||||
|
||||
use rustc_fs_util::path_to_c_string;
|
||||
|
||||
pub struct ArchiveRO {
|
||||
pub raw: &'static mut super::Archive,
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
//! LLVM diagnostic reports.
|
||||
|
||||
use libc::c_uint;
|
||||
use rustc_span::InnerSpan;
|
||||
|
||||
pub use self::Diagnostic::*;
|
||||
pub use self::OptimizationDiagnosticKind::*;
|
||||
|
||||
use crate::value::Value;
|
||||
use libc::c_uint;
|
||||
|
||||
use super::{DiagnosticInfo, SMDiagnostic};
|
||||
use rustc_span::InnerSpan;
|
||||
use crate::value::Value;
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub enum OptimizationDiagnosticKind {
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
#![allow(non_camel_case_types)]
|
||||
#![allow(non_upper_case_globals)]
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use libc::{c_char, c_int, c_uint, c_ulonglong, c_void, size_t};
|
||||
|
||||
use super::debuginfo::{
|
||||
DIArray, DIBasicType, DIBuilder, DICompositeType, DIDerivedType, DIDescriptor, DIEnumerator,
|
||||
DIFile, DIFlags, DIGlobalVariableExpression, DILexicalBlock, DILocation, DINameSpace,
|
||||
DISPFlags, DIScope, DISubprogram, DISubrange, DITemplateTypeParameter, DIType, DIVariable,
|
||||
DebugEmissionKind, DebugNameTableKind,
|
||||
};
|
||||
|
||||
use libc::{c_char, c_int, c_uint, size_t};
|
||||
use libc::{c_ulonglong, c_void};
|
||||
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use super::RustString;
|
||||
|
||||
pub type Bool = c_uint;
|
||||
|
@ -697,9 +695,10 @@ pub type DiagnosticHandlerTy = unsafe extern "C" fn(&DiagnosticInfo, *mut c_void
|
|||
pub type InlineAsmDiagHandlerTy = unsafe extern "C" fn(&SMDiagnostic, *const c_void, c_uint);
|
||||
|
||||
pub mod debuginfo {
|
||||
use super::{InvariantOpaque, Metadata};
|
||||
use bitflags::bitflags;
|
||||
|
||||
use super::{InvariantOpaque, Metadata};
|
||||
|
||||
#[repr(C)]
|
||||
pub struct DIBuilder<'a>(InvariantOpaque<'a>);
|
||||
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
#![allow(non_snake_case)]
|
||||
|
||||
use std::cell::RefCell;
|
||||
use std::ffi::{CStr, CString};
|
||||
use std::str::FromStr;
|
||||
use std::string::FromUtf8Error;
|
||||
|
||||
use libc::c_uint;
|
||||
use rustc_data_structures::small_c_str::SmallCStr;
|
||||
use rustc_llvm::RustString;
|
||||
use rustc_target::abi::Align;
|
||||
|
||||
pub use self::AtomicRmwBinOp::*;
|
||||
pub use self::CallConv::*;
|
||||
pub use self::CodeGenOptSize::*;
|
||||
|
@ -8,15 +18,6 @@ pub use self::Linkage::*;
|
|||
pub use self::MetadataType::*;
|
||||
pub use self::RealPredicate::*;
|
||||
|
||||
use libc::c_uint;
|
||||
use rustc_data_structures::small_c_str::SmallCStr;
|
||||
use rustc_llvm::RustString;
|
||||
use rustc_target::abi::Align;
|
||||
use std::cell::RefCell;
|
||||
use std::ffi::{CStr, CString};
|
||||
use std::str::FromStr;
|
||||
use std::string::FromUtf8Error;
|
||||
|
||||
pub mod archive_ro;
|
||||
pub mod diagnostic;
|
||||
mod ffi;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
use crate::back::write::create_informational_target_machine;
|
||||
use crate::errors::{
|
||||
FixedX18InvalidArch, InvalidTargetFeaturePrefix, PossibleFeature, TargetFeatureDisableOrEnable,
|
||||
UnknownCTargetFeature, UnknownCTargetFeaturePrefix, UnstableCTargetFeature,
|
||||
};
|
||||
use crate::llvm;
|
||||
use std::ffi::{c_char, c_void, CStr, CString};
|
||||
use std::fmt::Write;
|
||||
use std::path::Path;
|
||||
use std::sync::Once;
|
||||
use std::{ptr, slice, str};
|
||||
|
||||
use libc::c_int;
|
||||
use rustc_codegen_ssa::base::wants_wasm_eh;
|
||||
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
|
||||
|
@ -16,13 +16,12 @@ use rustc_span::symbol::Symbol;
|
|||
use rustc_target::spec::{MergeFunctions, PanicStrategy};
|
||||
use rustc_target::target_features::{RUSTC_SPECIAL_FEATURES, RUSTC_SPECIFIC_FEATURES};
|
||||
|
||||
use std::ffi::{c_char, c_void, CStr, CString};
|
||||
use std::fmt::Write;
|
||||
use std::path::Path;
|
||||
use std::ptr;
|
||||
use std::slice;
|
||||
use std::str;
|
||||
use std::sync::Once;
|
||||
use crate::back::write::create_informational_target_machine;
|
||||
use crate::errors::{
|
||||
FixedX18InvalidArch, InvalidTargetFeaturePrefix, PossibleFeature, TargetFeatureDisableOrEnable,
|
||||
UnknownCTargetFeature, UnknownCTargetFeaturePrefix, UnstableCTargetFeature,
|
||||
};
|
||||
use crate::llvm;
|
||||
|
||||
static INIT: Once = Once::new();
|
||||
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
use crate::attributes;
|
||||
use crate::base;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::errors::SymbolAlreadyDefined;
|
||||
use crate::llvm;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_hir::def::DefKind;
|
||||
use rustc_hir::def_id::{DefId, LOCAL_CRATE};
|
||||
|
@ -15,6 +9,11 @@ use rustc_session::config::CrateType;
|
|||
use rustc_target::spec::RelocModel;
|
||||
use tracing::debug;
|
||||
|
||||
use crate::context::CodegenCx;
|
||||
use crate::errors::SymbolAlreadyDefined;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::{attributes, base, llvm};
|
||||
|
||||
impl<'tcx> PreDefineMethods<'tcx> for CodegenCx<'_, 'tcx> {
|
||||
fn predefine_static(
|
||||
&self,
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
pub use crate::llvm::Type;
|
||||
use std::{fmt, ptr};
|
||||
|
||||
use crate::abi::{FnAbiLlvmExt, LlvmType};
|
||||
use crate::common;
|
||||
use crate::context::CodegenCx;
|
||||
use crate::llvm;
|
||||
use crate::llvm::{Bool, False, True};
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
use libc::{c_char, c_uint};
|
||||
use rustc_codegen_ssa::common::TypeKind;
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_data_structures::small_c_str::SmallCStr;
|
||||
|
@ -16,10 +10,13 @@ use rustc_middle::ty::{self, Ty};
|
|||
use rustc_target::abi::call::{CastTarget, FnAbi, Reg};
|
||||
use rustc_target::abi::{AddressSpace, Align, Integer, Size};
|
||||
|
||||
use std::fmt;
|
||||
use std::ptr;
|
||||
|
||||
use libc::{c_char, c_uint};
|
||||
use crate::abi::{FnAbiLlvmExt, LlvmType};
|
||||
use crate::context::CodegenCx;
|
||||
pub use crate::llvm::Type;
|
||||
use crate::llvm::{Bool, False, True};
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
use crate::{common, llvm};
|
||||
|
||||
impl PartialEq for Type {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
use crate::common::*;
|
||||
use crate::type_::Type;
|
||||
use std::fmt::Write;
|
||||
|
||||
use rustc_codegen_ssa::traits::*;
|
||||
use rustc_middle::bug;
|
||||
use rustc_middle::ty::layout::{LayoutOf, TyAndLayout};
|
||||
use rustc_middle::ty::print::{with_no_trimmed_paths, with_no_visible_paths};
|
||||
use rustc_middle::ty::{self, CoroutineArgsExt, Ty, TypeVisitableExt};
|
||||
use rustc_target::abi::{Abi, Align, FieldsShape};
|
||||
use rustc_target::abi::{Float, Int, Pointer};
|
||||
use rustc_target::abi::{Scalar, Size, Variants};
|
||||
use rustc_target::abi::{Abi, Align, FieldsShape, Float, Int, Pointer, Scalar, Size, Variants};
|
||||
use tracing::debug;
|
||||
|
||||
use std::fmt::Write;
|
||||
use crate::common::*;
|
||||
use crate::type_::Type;
|
||||
|
||||
fn uncached_llvm_type<'a, 'tcx>(
|
||||
cx: &CodegenCx<'a, 'tcx>,
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
use rustc_codegen_ssa::common::IntPredicate;
|
||||
use rustc_codegen_ssa::mir::operand::OperandRef;
|
||||
use rustc_codegen_ssa::traits::{BaseTypeMethods, BuilderMethods, ConstMethods};
|
||||
use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf};
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_target::abi::{Align, Endian, HasDataLayout, Size};
|
||||
|
||||
use crate::builder::Builder;
|
||||
use crate::type_::Type;
|
||||
use crate::type_of::LayoutLlvmExt;
|
||||
use crate::value::Value;
|
||||
use rustc_codegen_ssa::mir::operand::OperandRef;
|
||||
use rustc_codegen_ssa::{
|
||||
common::IntPredicate,
|
||||
traits::{BaseTypeMethods, BuilderMethods, ConstMethods},
|
||||
};
|
||||
use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf};
|
||||
use rustc_middle::ty::Ty;
|
||||
use rustc_target::abi::{Align, Endian, HasDataLayout, Size};
|
||||
|
||||
fn round_pointer_up_to_alignment<'ll>(
|
||||
bx: &mut Builder<'_, 'll, '_>,
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
pub use crate::llvm::Value;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::{fmt, ptr};
|
||||
|
||||
use crate::llvm;
|
||||
|
||||
use std::fmt;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::ptr;
|
||||
pub use crate::llvm::Value;
|
||||
|
||||
impl PartialEq for Value {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue