Skip to content

Commit

Permalink
Refactor API tools (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
raviqqe committed May 8, 2023
1 parent 9cf52dc commit 8c13f07
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
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.

0 comments on commit 8c13f07

Please sign in to comment.