use miette::Diagnostic;
#[non_exhaustive]
#[derive(Debug, thiserror::Error, Diagnostic)]
pub enum LlvmError {
#[error("LLVM IR parse failed: {reason}")]
ParseFailed {
reason: String,
},
#[error("LLVM IR emit failed: {reason}")]
EmitFailed {
reason: String,
},
#[error("lowering morphism failed: {reason}")]
LoweringFailed {
reason: String,
},
#[error("schema error: {0}")]
Schema(#[from] panproto_schema::SchemaError),
#[error("inkwell backend not enabled; rebuild with --features=inkwell-backend")]
InkwellNotEnabled,
}