core: build.rs to capture IR global constants
This commit is contained in:
parent
c4d54b198b
commit
5faac4b9d4
@ -74,8 +74,11 @@ fn compile_irrt_cpp() {
|
|||||||
// - `(?ms:^define.*?\}$)` captures LLVM `define` blocks
|
// - `(?ms:^define.*?\}$)` captures LLVM `define` blocks
|
||||||
// - `(?m:^declare.*?$)` captures LLVM `declare` lines
|
// - `(?m:^declare.*?$)` captures LLVM `declare` lines
|
||||||
// - `(?m:^%.+?=\s*type\s*\{.+?\}$)` captures LLVM `type` declarations
|
// - `(?m:^%.+?=\s*type\s*\{.+?\}$)` captures LLVM `type` declarations
|
||||||
let regex_filter =
|
// - `(?m:^@.+?=.+$)` captures global constants
|
||||||
Regex::new(r"(?ms:^define.*?\}$)|(?m:^declare.*?$)|(?m:^%.+?=\s*type\s*\{.+?\}$)").unwrap();
|
let regex_filter = Regex::new(
|
||||||
|
r"(?ms:^define.*?\}$)|(?m:^declare.*?$)|(?m:^%.+?=\s*type\s*\{.+?\}$)|(?m:^@.+?=.+$)",
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
for f in regex_filter.captures_iter(&output) {
|
for f in regex_filter.captures_iter(&output) {
|
||||||
assert_eq!(f.len(), 1);
|
assert_eq!(f.len(), 1);
|
||||||
filtered_output.push_str(&f[0]);
|
filtered_output.push_str(&f[0]);
|
||||||
|
Loading…
Reference in New Issue
Block a user