Beaver.MLIR.Location (beaver v0.3.4)

This module defines functions working with MLIR Location.

Summary

Functions

Get a location of file line. Column is zero by default because in Elixir it is usually omitted.

Create an MLIR location from Macro.Env

Types

@type t() :: %Beaver.MLIR.Location{bag: term(), ref: term()}

Functions

Get a location of file line. Column is zero by default because in Elixir it is usually omitted.

Examples

iex> ctx = MLIR.Context.create()
iex> MLIR.Location.file(name: "filename", line: 1, column: 1, ctx: ctx) |> MLIR.to_string()
~s{filename:1:1}
iex> ctx |> MLIR.Context.destroy
Link to this function

from_env(env, opts \\ [])

Create an MLIR location from Macro.Env

Link to this function

unknown(opts \\ [])