repo.or.cz
/
llvm-complete.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[Alignment][NFC] Allow constexpr Align
[llvm-complete.git]
/
test
/
Reduce
/
Inputs
/
remove-global-vars.py
blob
1ae8b0e6e76cad164d4f1fcefba048a89e7b7851
1
#!/usr/bin/env python
2
3
import
sys
4
5
InterestingVar
=
0
6
7
input
=
open
(
sys
.
argv
[
1
],
"r"
)
8
for
line
in
input
:
9
i
=
line
.
find
(
';'
)
10
if
i
>=
0
:
11
line
=
line
[:
i
]
12
if
line
.
startswith
(
"@interesting = global"
)
or
"@interesting"
in
line
:
13
InterestingVar
+=
1
14
15
if
InterestingVar
==
4
:
16
sys
.
exit
(
0
)
# interesting!
17
18
sys
.
exit
(
1
)