Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
ad1d853
Use a macro to reduce duplication in `core/src/num/f{16,32,64,128}.rs…
beetrees Sep 27, 2026
6af8cac
Remove duplicate `float_impl` macros
beetrees Sep 28, 2026
afd0f73
feat: improve Cell doc
Its-Just-Nans Oct 25, 2026
c3f56a0
Add safety section for from_utf8_unchecked/from_raw_parts
yilin0518 Oct 27, 2026
a307a2f
Suggest `gca!` for path const args that use generic params
yashaggarwal85d Oct 27, 2026
ec550e6
Add regression test for overlap check hang with unresolved type in wh…
zakrad Oct 26, 2026
63f21c8
Add regression test for new solver hang on cyclic projection bound
zakrad Oct 21, 2026
8d6618b
Reword gca help that still mentions removed `type const` items
yashaggarwal85d Oct 29, 2026
747933f
add example for misaligned elements in subslice_range
asquared31415 Oct 25, 2026
5175ee3
Tiny optimization to `TypeErrCtxt::report_inference_failure()`
DanielEScherzer Oct 29, 2026
2a0f69d
vfe: only use `type.checked.load` on function-pointers
folkertdev Oct 13, 2026
c41febf
vfe: make `load_vtable` private
folkertdev Oct 13, 2026
dfbacfb
vfe: refactor
folkertdev Oct 13, 2026
2338216
Disallow some special chars in bat script names
ChrisDenton Oct 28, 2026
d74cae2
limit lldb string summary length
Walnut356 Oct 30, 2026
9cf962b
Improve delayed bug comment and message
lsunsi Oct 30, 2026
b828b1d
inhabitedness: use try_normalize_erasing_regions on ADT fields
Vara715 Oct 30, 2026
8b70852
Inline usages of `is_doc_keyword_or_attribute` and `is_rustc_doc_prim…
JonathanBrouwer Oct 30, 2026
6763102
tests: clarify dead_code_pub_in_binary FIXME after Cargo workaround
paradoxicalguy Oct 30, 2026
4bc1baa
use [N x i8] for array index / ptr offset GEP types
erikdesjardins Mar 11, 2024
36265cf
Add tests for 165052 ICE
zachs18 Oct 30, 2026
5ae49d9
Don't ICE when making diagnostic in `point_at_dyn_trait_in_field_def`…
zachs18 Oct 30, 2026
4f49250
add MaybeUninit::from_ref
malezjaa Oct 31, 2026
d779c9b
core: Rename `abort_immediate` to `crash`
tgross35 Oct 21, 2026
f8613c8
Add `feature(stdarch_loongarch)` for bootstrap
heiher Oct 31, 2026
b33e5d4
Fix error output for invalid `SBValue` children
Walnut356 Oct 31, 2026
57bb231
use `[expr; N]` literals for long arrays of the same element
folkertdev Oct 31, 2026
3e28b25
remove the `packed` argument from `type_struct`
folkertdev Oct 31, 2026
0b2bf3e
Move `llvm::Context` into a new submodule
Zalathar Oct 31, 2026
d0eb8f9
Use an invariant lifetime brand for LLVM modules
Zalathar Oct 31, 2026
ec6ec21
Rollup merge of #163410 - beetrees:float-macro-1, r=ChrisDenton
JonathanBrouwer Oct 31, 2026
c3cb9e6
Rollup merge of #164290 - folkertdev:vfe-load-fix, r=saethlin
JonathanBrouwer Oct 31, 2026
aca8e74
Rollup merge of #165113 - Walnut356:summary_limits, r=Kobzol
JonathanBrouwer Oct 31, 2026
71e5da0
Rollup merge of #165146 - beetrees:no-llvm-struct-gep, r=nikic
JonathanBrouwer Oct 31, 2026
c395e13
Rollup merge of #165197 - JonathanBrouwer:attr_ext, r=GuillaumeGomez
JonathanBrouwer Oct 31, 2026
952f15a
Rollup merge of #165209 - zachs18:fix-165052, r=estebank
JonathanBrouwer Oct 31, 2026
648154d
Rollup merge of #165228 - Walnut356:invalid_sbvalue, r=Kobzol
JonathanBrouwer Oct 31, 2026
b6ac5b9
Rollup merge of #153633 - Its-Just-Nans:improve-cell-doc, r=Mark-Simu…
JonathanBrouwer Oct 31, 2026
4be724b
Rollup merge of #164686 - zakrad:regr-test-151723, r=adwinwhite
JonathanBrouwer Oct 31, 2026
f231ee7
Rollup merge of #164730 - tgross35:abort_immediate-rename, r=jhpratt
JonathanBrouwer Oct 31, 2026
53b3314
Rollup merge of #164937 - asquared31415:slice_subslice_range_docs, r=…
JonathanBrouwer Oct 31, 2026
02ee21e
Rollup merge of #165019 - yilin0518:unify-unsafe-str, r=JohnTitor
JonathanBrouwer Oct 31, 2026
5d80661
Rollup merge of #165035 - yashaggarwal85d:fix-gca-macro-suggestion, r…
JonathanBrouwer Oct 31, 2026
e13c4b8
Rollup merge of #165067 - Zalathar:llmod, r=hanna-kruppe
JonathanBrouwer Oct 31, 2026
8b5b086
Rollup merge of #165106 - ChrisDenton:bat-name, r=workingjubilee
JonathanBrouwer Oct 31, 2026
a88fcb2
Rollup merge of #165120 - zakrad:regr-test-152169, r=chenyukang
JonathanBrouwer Oct 31, 2026
d5ecb52
Rollup merge of #165158 - DanielEScherzer:TypeErrCtxt-report_inferenc…
JonathanBrouwer Oct 31, 2026
0c61120
Rollup merge of #165190 - lsunsi:improve-delayed-bug-first-method-vta…
JonathanBrouwer Oct 31, 2026
803ce30
Rollup merge of #165196 - Vara715:fix-opsem-inhabited-normalize, r=ol…
JonathanBrouwer Oct 31, 2026
91c85a7
Rollup merge of #165206 - paradoxicalguy:docs/update-dead-code-pub-in…
JonathanBrouwer Oct 31, 2026
a0b6069
Rollup merge of #165214 - malezjaa:add-from-ref, r=joboet
JonathanBrouwer Oct 31, 2026
36785a0
Rollup merge of #165225 - heiher:fix-loong-native-build, r=folkertdev
JonathanBrouwer Oct 31, 2026
79b0008
Rollup merge of #165235 - folkertdev:vector-array-cleanup, r=hanna-kr…
JonathanBrouwer Oct 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions compiler/rustc_ast/src/attr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,29 +246,6 @@ impl AttributeExt for Attribute {
}
}

fn is_doc_keyword_or_attribute(&self) -> bool {
match &self.kind {
AttrKind::Normal(_) => {
if self.has_name(sym::doc)
&& let Some(items) = self.meta_item_list()
{
for item in items {
if item.has_name(sym::keyword) || item.has_name(sym::attribute) {
return true;
}
}
}
}
_ => {}
}

false
}

fn is_rustc_doc_primitive(&self) -> bool {
self.has_name(sym::rustc_doc_primitive)
}

/// Returns whether this attribute is any of the proc macro attributes.
/// i.e. `proc_macro`, `proc_macro_attribute` or `proc_macro_derive`.
fn is_proc_macro_attr(&self) -> bool {
Expand Down Expand Up @@ -993,12 +970,6 @@ pub trait AttributeExt: Debug + 'static {
/// commented module (for inner doc) vs within its parent module (for outer
/// doc).
fn doc_resolution_scope(&self) -> Option<AttrStyle>;

/// Returns `true` is this attribute contains `doc(keyword)` or `doc(attribute)`.
fn is_doc_keyword_or_attribute(&self) -> bool;

/// Returns `true` if this is a `#[rustc_doc_primitive]` attribute.
fn is_rustc_doc_primitive(&self) -> bool;
}

// FIXME(fn_delegation): use function delegation instead of manually forwarding
Expand Down
8 changes: 0 additions & 8 deletions compiler/rustc_attr_ir/src/attr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,4 @@ impl AttributeExt for Attribute {
)
)
}

fn is_doc_keyword_or_attribute(&self) -> bool {
matches!(self, Attribute::Parsed(AttributeKind::Doc(d)) if d.attribute.is_some() || d.keyword.is_some())
}

fn is_rustc_doc_primitive(&self) -> bool {
matches!(self, Attribute::Parsed(AttributeKind::RustcDocPrimitive(..)))
}
}
6 changes: 6 additions & 0 deletions compiler/rustc_borrowck/src/diagnostics/region_errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1109,6 +1109,12 @@ impl<'diag, 'tcx> MirBorrowckCtxt<'_, 'diag, 'tcx> {

let mut v = ty::TraitObjectVisitor(vec![]);
v.visit_ty_unambig(f.ty);

if v.0.is_empty() {
// No trait object found in this return
continue;
}

let mut span: MultiSpan = v.0.iter().map(|x| x.span).collect::<Vec<_>>().into();
// Display the item and variant lines.
for def_span in def_spans {
Expand Down
53 changes: 14 additions & 39 deletions compiler/rustc_codegen_gcc/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use rustc_codegen_ssa::common::{
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
use rustc_codegen_ssa::mir::place::PlaceRef;
use rustc_codegen_ssa::traits::{
BackendTypes, BaseTypeCodegenMethods, BuilderMethods, ConstCodegenMethods,
LayoutTypeCodegenMethods, OverflowOp, ReturnSlot, StaticBuilderMethods,
BackendTypes, BaseTypeCodegenMethods, BuilderMethods, ConstCodegenMethods, OverflowOp,
ReturnSlot, StaticBuilderMethods,
};
use rustc_data_structures::fx::FxHashSet;
use rustc_middle::middle::codegen_fn_attrs::CodegenFnAttrs;
Expand Down Expand Up @@ -1187,11 +1187,9 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
let align = dest.val.align.restrict_for_offset(dest.layout.field(self.cx(), 0).size);
cg_elem.val.store(self, PlaceRef::new_sized_aligned(current_val, cg_elem.layout, align));

let next = self.inbounds_gep(
self.backend_type(cg_elem.layout),
current.to_rvalue(),
&[self.const_usize(1)],
);
let next = self
.inbounds_ptradd(current.to_rvalue(), self.const_usize(cg_elem.layout.size.bytes()));
let next = self.context.new_cast(self.location, next, ptr_type);
self.llbb().add_assignment(self.location, current, next);
self.br(header_bb);

Expand Down Expand Up @@ -1270,52 +1268,29 @@ impl<'a, 'gcc, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'gcc, 'tcx> {
);
}

fn gep(
&mut self,
typ: Type<'gcc>,
ptr: RValue<'gcc>,
indices: &[RValue<'gcc>],
) -> RValue<'gcc> {
// NOTE: due to opaque pointers now being used, we need to cast here.
let ptr = self.context.new_cast(self.location, ptr, typ.make_pointer());
fn gep(&mut self, stride: Size, ptr: RValue<'gcc>, index: RValue<'gcc>) -> RValue<'gcc> {
let ptr_type = ptr.get_type();
let mut pointee_type = ptr.get_type();
// NOTE: we cannot use array indexing here like in inbounds_gep because array indexing is
// always considered in bounds in GCC (FIXME(antoyo): to be verified).
// So, we have to cast to a number.
let mut result = self.context.new_bitcast(self.location, ptr, self.sizet_type);
// FIXME(antoyo): if there were more than 1 index, this code is probably wrong and would
// require dereferencing the pointer.
for index in indices {
pointee_type = pointee_type.get_pointee().expect("pointee type");
#[cfg(feature = "master")]
let pointee_size = {
let size = self.cx.context.new_sizeof(pointee_type);
self.context.new_cast(self.location, size, index.get_type())
};
#[cfg(not(feature = "master"))]
let pointee_size =
self.context.new_rvalue_from_int(index.get_type(), pointee_type.get_size() as i32);
result = result + self.gcc_int_cast(*index * pointee_size, self.sizet_type);
}
let ptr = self.context.new_bitcast(self.location, ptr, self.sizet_type);
let pointee_size =
self.context.new_rvalue_from_int(index.get_type(), stride.bytes() as i32);
let result = ptr + self.gcc_int_cast(index * pointee_size, self.sizet_type);
self.context.new_bitcast(self.location, result, ptr_type)
}

fn inbounds_gep(
&mut self,
typ: Type<'gcc>,
stride: Size,
ptr: RValue<'gcc>,
indices: &[RValue<'gcc>],
index: RValue<'gcc>,
) -> RValue<'gcc> {
let typ = self.cx.type_array(self.cx.type_i8(), stride.bytes());
// NOTE: due to opaque pointers now being used, we need to cast here.
let ptr = self.context.new_cast(self.location, ptr, typ.make_pointer());
// NOTE: array indexing is always considered in bounds in GCC (FIXME(antoyo): to be verified).
let mut indices = indices.iter();
let index = indices.next().expect("first index in inbounds_gep");
let mut result = self.context.new_array_access(self.location, ptr, *index);
for index in indices {
result = self.context.new_array_access(self.location, result, *index);
}
let result = self.context.new_array_access(self.location, ptr, index);
result.get_address(self.location)
}

Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_codegen_gcc/src/intrinsic/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use rustc_codegen_ssa::diagnostics::ExpectedPointerMutability;
use rustc_codegen_ssa::diagnostics::InvalidMonomorphization;
use rustc_codegen_ssa::mir::operand::OperandRef;
use rustc_codegen_ssa::mir::place::PlaceRef;
use rustc_codegen_ssa::traits::{BaseTypeCodegenMethods, BuilderMethods, LayoutTypeCodegenMethods};
use rustc_codegen_ssa::traits::{BaseTypeCodegenMethods, BuilderMethods};
#[cfg(feature = "master")]
use rustc_hir as hir;
use rustc_middle::mir::BinOp;
Expand Down Expand Up @@ -671,7 +671,6 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
);
}

let pointee_type = bx.backend_type(layout);
let pointers = args[0].immediate();
let offsets = args[1].immediate();
let elem_type = llret_ty.dyncast_vector().expect("vector return type").get_element_type();
Expand All @@ -680,7 +679,7 @@ pub fn generic_simd_intrinsic<'a, 'gcc, 'tcx>(
let index = bx.context.new_rvalue_from_long(bx.usize_type, i as _);
let pointer = bx.extract_element(pointers, index);
let offset = bx.extract_element(offsets, index);
let pointer = bx.gep(pointee_type, pointer, &[offset]);
let pointer = bx.gep(layout.size, pointer, offset);
// GCC has no pointer vectors, so the lanes are `usize`.
bx.ptrtoint(pointer, elem_type)
})
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ impl LlvmType for CastTarget {
let prefix_args = self.prefix.iter().map(|reg| reg.llvm_type(cx));
let rest_args = (0..rest_count).map(|_| rest_ll_unit);
let args: Vec<_> = prefix_args.chain(rest_args).collect();
cx.type_struct(&args, false)
cx.type_struct(&args)
}
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/asm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ impl<'ll, 'tcx> AsmBuilderMethods<'tcx> for Builder<'_, 'll, 'tcx> {
let output_type = match &output_types[..] {
[] => self.type_void(),
[ty] => ty,
tys => self.type_struct(tys, false),
tys => self.type_struct(tys),
};
let dialect = match asm_arch {
InlineAsmArch::X86 | InlineAsmArch::X86_64
Expand Down
37 changes: 15 additions & 22 deletions compiler/rustc_codegen_llvm/src/back/llvm_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ impl CodegenBackend for LlvmCodegenBackend {

pub struct ModuleLlvm {
llcx_raw: ptr::NonNull<llvm::ContextRaw>,
llmod_raw: *const llvm::Module,
llmod_raw: ptr::NonNull<llvm::ModuleRaw>,

// This field is `ManuallyDrop` because it is important that the `TargetMachine`
// is disposed prior to the `Context` being disposed otherwise UAFs can occur.
Expand All @@ -461,22 +461,15 @@ pub struct ModuleLlvm {
// `ModuleLlvm` owns the context and only allows borrowing LLVM objects tied to the context.
unsafe impl Send for ModuleLlvm {}

/// Converts an unbranded pointer-to-context to a lifetime-branded [`llvm::Context`].
///
/// # Safety
/// - The pointer must be a valid LLVM context.
/// - If the context is passed to safe code, its caller-requested lifetime must be distinct
/// from that of any other context, and must not outlive the underlying context.
unsafe fn wrap_llcx<'ll>(llcx_raw: ptr::NonNull<llvm::ContextRaw>) -> llvm::Context<'ll> {
llvm::Context { llcx_raw, _invariant_ll: PhantomData }
}

/// Shared helper to call [`llvm::LLVMContextCreate`] and then configure
/// [`llvm::LLVMContextSetDiscardValueNames`].
fn create_context_and_set_fewer_names(fewer_names: bool) -> ptr::NonNull<llvm::ContextRaw> {
unsafe {
let llcx_raw = llvm::LLVMContextCreate();
llvm::LLVMContextSetDiscardValueNames(wrap_llcx(llcx_raw), fewer_names.to_llvm_bool());
llvm::LLVMContextSetDiscardValueNames(
llvm::wrap_llcx(llcx_raw),
fewer_names.to_llvm_bool(),
);
llcx_raw
}
}
Expand All @@ -485,7 +478,8 @@ impl ModuleLlvm {
pub(crate) fn new(tcx: TyCtxt<'_>, mod_name: &str) -> Self {
unsafe {
let llcx_raw = create_context_and_set_fewer_names(tcx.sess.fewer_names());
let llmod_raw = context::create_module(tcx, wrap_llcx(llcx_raw), mod_name);
let llmod_raw =
context::create_module(tcx, llvm::wrap_llcx(llcx_raw), mod_name).llmod_raw();
ModuleLlvm {
llmod_raw,
llcx_raw,
Expand All @@ -498,7 +492,8 @@ impl ModuleLlvm {
pub(crate) fn new_metadata(tcx: TyCtxt<'_>, mod_name: &str) -> Self {
unsafe {
let llcx_raw = create_context_and_set_fewer_names(tcx.sess.fewer_names());
let llmod_raw = context::create_module(tcx, wrap_llcx(llcx_raw), mod_name);
let llmod_raw =
context::create_module(tcx, llvm::wrap_llcx(llcx_raw), mod_name).llmod_raw();
ModuleLlvm {
llmod_raw,
llcx_raw,
Expand All @@ -517,7 +512,8 @@ impl ModuleLlvm {
) -> Self {
unsafe {
let llcx_raw = create_context_and_set_fewer_names(cgcx.fewer_names);
let llmod_raw = back::lto::parse_module(wrap_llcx(llcx_raw), name, buffer, dcx);
let llmod_raw =
back::lto::parse_module(llvm::wrap_llcx(llcx_raw), name, buffer, dcx).llmod_raw();
let tm = tm_factory(dcx, TargetMachineFactoryConfig::new(cgcx, name.to_str().unwrap()));

ModuleLlvm {
Expand All @@ -538,12 +534,9 @@ impl ModuleLlvm {
&self,
inner_fn: impl for<'ll> FnOnce(ModuleRefs<'ll>) -> R,
) -> R {
inner_fn(ModuleRefs {
llcx: unsafe { wrap_llcx(self.llcx_raw) },
llmod: unsafe { &*self.llmod_raw },
tm: self.tm.raw(),
_ph: PhantomData,
})
let llcx = unsafe { llvm::wrap_llcx(self.llcx_raw) };
let llmod = unsafe { llvm::wrap_llmod(llcx, self.llmod_raw) };
inner_fn(ModuleRefs { llcx, llmod, tm: self.tm.raw(), _ph: PhantomData })
}
}

Expand All @@ -560,7 +553,7 @@ impl Drop for ModuleLlvm {
#[derive(Clone, Copy)]
pub(crate) struct ModuleRefs<'ll> {
pub(crate) llcx: llvm::Context<'ll>,
pub(crate) llmod: &'ll llvm::Module,
pub(crate) llmod: llvm::Module<'ll>,
pub(crate) tm: &'ll llvm::TargetMachine,
/// Make sure `'ll` is invariant, even if no fields happen to require that.
///
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_llvm/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ pub struct ModuleBuffer {
}

impl ModuleBuffer {
pub(crate) fn new(m: &llvm::Module, is_thin: bool) -> ModuleBuffer {
pub(crate) fn new<'ll>(m: llvm::Module<'ll>, is_thin: bool) -> ModuleBuffer {
unsafe {
let buffer = llvm::LLVMRustModuleSerialize(m, is_thin);
ModuleBuffer { data: Buffer(buffer) }
Expand Down Expand Up @@ -859,7 +859,7 @@ pub(crate) fn parse_module<'ll>(
name: &CStr,
data: &[u8],
dcx: DiagCtxtHandle<'_>,
) -> &'ll llvm::Module {
) -> llvm::Module<'ll> {
unsafe {
llvm::LLVMRustParseBitcodeForLTO(llcx, data.as_ptr(), data.len(), name.as_ptr())
.unwrap_or_else(|| write::llvm_err(dcx, LlvmError::ParseBitcode))
Expand Down
12 changes: 8 additions & 4 deletions compiler/rustc_codegen_llvm/src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn write_output_file<'ll>(
dcx: DiagCtxtHandle<'_>,
target: &'ll llvm::TargetMachine,
no_builtins: bool,
m: &'ll llvm::Module,
m: llvm::Module<'ll>,
output: &Path,
dwo_output: Option<&Path>,
file_type: llvm::FileType,
Expand Down Expand Up @@ -1207,7 +1207,7 @@ pub(crate) fn bitcode_section_name(cgcx: &CodegenContext) -> &'static CStr {
fn embed_bitcode<'ll>(
cgcx: &CodegenContext,
llcx: llvm::Context<'ll>,
llmod: &'ll llvm::Module,
llmod: llvm::Module<'ll>,
bitcode: &[u8],
) {
// We're adding custom sections to the output object file, but we definitely
Expand Down Expand Up @@ -1293,7 +1293,7 @@ fn embed_bitcode<'ll>(
fn create_msvc_imps<'ll>(
cgcx: &CodegenContext,
llcx: llvm::Context<'ll>,
llmod: &'ll llvm::Module,
llmod: llvm::Module<'ll>,
) {
if !cgcx.msvc_imps_needed {
return;
Expand Down Expand Up @@ -1359,7 +1359,11 @@ fn record_artifact_size(
}
}

fn record_llvm_cgu_instructions_stats(prof: &SelfProfilerRef, name: &str, llmod: &llvm::Module) {
fn record_llvm_cgu_instructions_stats<'ll>(
prof: &SelfProfilerRef,
name: &str,
llmod: llvm::Module<'ll>,
) {
if !prof.enabled() {
return;
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_codegen_llvm/src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ impl<'ll> Iterator for ValueIter<'ll> {
}
}

pub(crate) fn iter_globals(llmod: &llvm::Module) -> ValueIter<'_> {
pub(crate) fn iter_globals<'ll>(llmod: llvm::Module<'ll>) -> ValueIter<'ll> {
unsafe { ValueIter { cur: llvm::LLVMGetFirstGlobal(llmod), step: llvm::LLVMGetNextGlobal } }
}

pub(crate) fn iter_global_aliases(llmod: &llvm::Module) -> ValueIter<'_> {
pub(crate) fn iter_global_aliases<'ll>(llmod: llvm::Module<'ll>) -> ValueIter<'ll> {
unsafe {
ValueIter { cur: llvm::LLVMGetFirstGlobalAlias(llmod), step: llvm::LLVMGetNextGlobalAlias }
}
Expand Down
Loading
Loading