Struct cretonne_codegen::ir::SourceLoc
[−]
[src]
pub struct SourceLoc(_);
A source location.
This is an opaque 32-bit number attached to each Cretonne IR instruction. Cretonne does not interpret source locations in any way, they are simply preserved from the input to the output.
The default source location uses the all-ones bit pattern !0
. It is used for instructions
that can't be given a real source location.
Methods
impl SourceLoc
[src]
pub fn new(bits: u32) -> Self
[src]
Create a new source location with the given bits.
pub fn is_default(self) -> bool
[src]
Is this the default source location?
pub fn bits(self) -> u32
[src]
Read the bits of this source location.
Trait Implementations
impl Clone for SourceLoc
[src]
fn clone(&self) -> SourceLoc
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for SourceLoc
[src]
impl Debug for SourceLoc
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl PartialEq for SourceLoc
[src]
fn eq(&self, __arg_0: &SourceLoc) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &SourceLoc) -> bool
[src]
This method tests for !=
.