Struct llvm_link::ObjFile
[−]
[src]
pub struct ObjFile { /* fields omitted */ }
Object Files loaded from the File System into LLVM directly
These files are not part of Rust's memory. They remain within
the LLVM. The ObjectFile
type is really only 1 ptr wide
Methods
impl ObjFile
[src]
fn new<P: AsRef<Path>>(path: P) -> Result<ObjFile, String>
Load an Object File from the file system
fn assert_target_triple<P: AsRef<Path>, S: AsRef<str>>(path: P,
target_triple_prefix: S)
-> Result<ObjFile, String>
target_triple_prefix: S)
-> Result<ObjFile, String>
Load an Object File asserting its target triple
fn is_object_file<P: AsRef<Path>>(path: P) -> bool
Check if path leads to an object file
fn is_object_file_for_target<P: AsRef<Path>, S: AsRef<str>>(path: P,
target_triple_prefix: S)
-> bool
target_triple_prefix: S)
-> bool
Check if path is an object file for a specific target triple
fn from_cstr(path: &CStr) -> Result<ObjFile, String>
Functionally this is an identical operation to ObjFile::new
The only difference is the internal path is not re-allocated
as CStr
implies there is always a null terminator. While
AsRef<path>
is a very nice Rusty way to handle path variables.
fn is_object_file_ffi(path: &CStr) -> bool
Functionally this is identical to the operation ObjFile::is_object_file
Just the internal path is not re-allocated
fn is_obj_file_for_target_ffi(path: &CStr, tt: &CStr) -> bool
Functionally this is identical to the operation ObjFile::is_object_file_for_target
Just the internal path is not re-allocated
Trait Implementations
impl Drop for ObjFile
[src]
impl LinkerObject for ObjFile
[src]
fn as_object(&self) -> lto_module_t
Exposes internal C-binding poitner
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