Expand description
Source locations. Every IR node carries a Location for diagnostics: an UnknownLoc, a
SourceLoc span in a source, or a CallSiteLoc that pairs a location with its caller’s.
Structs§
- Call
Site Loc - The location
calleeof a node, together with the locationcallerof the call site it comes from. - Call
Site LocObj - The object behind
CallSiteLoc. - Location
- Where an IR node comes from, for diagnostics: an
UnknownLoc, aSourceLocor aCallSiteLoc. - Location
Obj - The object behind
Location. - Source
Loc - The span from
start_line,start_columntoend_line,end_columnin the sourcesource_name, in the line and column numbering of the frontend that produced it. - Source
LocObj - The object behind
SourceLoc. - Source
Name - The name of a source, such as a file name;
SourceName::getreturns the shared object for a name. - Source
Name Obj - The object behind
SourceName. - Unknown
- A marker for the unknown location as the
locargument of a constructor:Var::new("x", ty, UNKNOWN_LOC). - Unknown
Loc - The location of a node with no source information, a single shared object.
- Unknown
LocObj - The object behind
UnknownLoc.
Constants§
- UNKNOWN_
LOC - The unknown location, as the
locargument of a constructor.