Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor API tools #108

Merged
merged 4 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions melior/src/pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ impl Pass {
self.raw
}

#[doc(hidden)]
pub fn __private_from_raw_fn(create_raw: unsafe extern "C" fn() -> MlirPass) -> Self {
Self::from_raw_fn(create_raw)
}
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions tools/api/difference.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

set -e

. $(dirname $0)/utility.sh

directory=/tmp/melior

mkdir -p $directory

implemented_api >$directory/implemented.txt
all_api >$directory/all.txt

diff -u $directory/implemented.txt $directory/all.txt | grep '^+[mM]' | sed s/^.//
4 changes: 1 addition & 3 deletions tools/utility.sh → tools/api/utility.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
directory=$(dirname $0)

count() {
wc -l
}
Expand All @@ -10,7 +8,7 @@ filter_api() {

implemented_api() {
(
cd $directory/../melior
cd $(dirname $0)/../../melior

cargo install cargo-expand
cargo expand | filter_api
Expand Down
12 changes: 0 additions & 12 deletions tools/api_difference.sh

This file was deleted.