Trait pdb::ItemIndex[][src]

pub trait ItemIndex: Copy + Default + Debug + Display + PartialEq + PartialOrd + From<u32> + Into<u32> {
    fn is_cross_module(self) -> bool { ... }
}

An index into either the TypeInformation or IdInformation stream.

Provided methods

fn is_cross_module(self) -> bool[src]

Returns true if this is a cross module reference.

When compiling with LTO, the compiler may reference types and ids across modules. In such cases, a lookup in the global streams will not succeed. Instead, the import must be resolved using cross module references:

  1. Look up the index in CrossModuleImports of the current module.
  2. Use StringTable to resolve the name of the referenced module.
  3. Find the Module with the same module name and load its ModuleInfo.
  4. Resolve the Local index into a global one using CrossModuleExports.

Cross module references are specially formatted indexes with the most significant bit set to 1. The remaining bits are divided into a module and index offset into the CrossModuleImports section.

Loading content...

Implementors

Loading content...