From c166546c1794106ab34f40c46d08001cdce218ec Mon Sep 17 00:00:00 2001 From: tw-ilson Date: Fri, 5 Jul 2024 18:13:02 -0700 Subject: [PATCH 1/2] add support for unstable feature --- Cargo.toml | 3 ++- build.rs | 2 ++ src/record_keeper.rs | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 66de27d..66231eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,10 +12,11 @@ documentation = "https://danacus.gitlab.io/tblgen-rs/tblgen/" exclude = ["doc/"] [features] -default = ["llvm18-0"] +default = ["llvm19-0"] llvm16-0 = [] llvm17-0 = [] llvm18-0 = [] +llvm19-0 = [] [dependencies] thiserror = "1.0.61" diff --git a/build.rs b/build.rs index 80648b4..bf4e0ff 100644 --- a/build.rs +++ b/build.rs @@ -12,6 +12,8 @@ const LLVM_MAJOR_VERSION: usize = 16; const LLVM_MAJOR_VERSION: usize = 17; #[cfg(feature = "llvm18-0")] const LLVM_MAJOR_VERSION: usize = 18; +#[cfg(feature = "llvm19-0")] +const LLVM_MAJOR_VERSION: usize = 19; fn main() { if let Err(error) = run() { diff --git a/src/record_keeper.rs b/src/record_keeper.rs index 21b0a32..5f0e932 100644 --- a/src/record_keeper.rs +++ b/src/record_keeper.rs @@ -10,7 +10,7 @@ use std::marker::PhantomData; -#[cfg(feature = "llvm18-0")] +#[cfg(any(feature = "llvm18-0", feature = "llvm19-0"))] use crate::error::TableGenError; #[cfg(any(feature = "llvm16-0", feature = "llvm17-0"))] use crate::error::{SourceLocation, TableGenError, WithLocation}; From 6181fa93227ed03c288c2f338365afcdae86914d Mon Sep 17 00:00:00 2001 From: tw-ilson Date: Sat, 6 Jul 2024 13:22:02 -0700 Subject: [PATCH 2/2] fix default feature --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 66231eb..7b67ecb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://danacus.gitlab.io/tblgen-rs/tblgen/" exclude = ["doc/"] [features] -default = ["llvm19-0"] +default = ["llvm18-0"] llvm16-0 = [] llvm17-0 = [] llvm18-0 = []