Trait llvm_link::LinkerObject
[−]
[src]
pub trait LinkerObject { fn as_object(&self) -> lto_module_t; fn get_num_symbols(&self) -> u32 { ... } fn get_symbol_name(&self, index: u32) -> Result<String, String> { ... } fn get_target_triple(&self) -> Result<String, String> { ... } }
Unifying properties that all linker objects posses.
Object files are known by the type ObjFile
. This lets the developer inspect them
easierly
use llvm_link::{ObjFile,LinkerObject}; let obj = match ObjFile::new("my/file.o") { Ok(x) => x, Err(e) => panic!("Could not load {}",e) }; match obj.get_target_triple() { Ok(x) => println!("m/file.o's target triple is {}",x), Err(e) => panic!("Could not load triple {}",e) };
Required Methods
fn as_object(&self) -> lto_module_t
Provided Methods
fn get_num_symbols(&self) -> u32
Get the number of symbols in an object file
fn get_symbol_name(&self, index: u32) -> Result<String, String>
Get the name of a symbol at a certain index
fn get_target_triple(&self) -> Result<String, String>
Get the target triple an object file was compiled for