https://github.com/ericr/llvmq
A query tool for LLVM IR.
https://github.com/ericr/llvmq
llvm llvm-ir
Last synced: 2 months ago
JSON representation
A query tool for LLVM IR.
- Host: GitHub
- URL: https://github.com/ericr/llvmq
- Owner: EricR
- License: mit
- Created: 2018-12-15T19:06:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-15T19:27:51.000Z (over 7 years ago)
- Last Synced: 2023-03-13T12:11:25.254Z (about 3 years ago)
- Topics: llvm, llvm-ir
- Language: Go
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# llvmq
A query tool for LLVM IR.
## Usage
```
$ llvmq testdata/coreutils/test/stat.ll "ll.Funcs.forEach(function(func) { console.log(func.GlobalIdent.GlobalName) })"
2018/12/15 14:11:30 Parsing testdata/coreutils/test/stat.ll
2018/12/15 14:11:30 Parsed in 0.231463s
2018/12/15 14:11:30 Executing query
usage
llvm.dbg.declare
llvm.dbg.value
dcgettext
__fprintf_chk
__printf_chk
fputs_unlocked
llvm.lifetime.start.p0i8
llvm.memcpy.p0i8.p0i8.i64
strcmp
setlocale
strncmp
llvm.lifetime.end.p0i8
exit
main
bindtextdomain
textdomain
localeconv
strlen
atexit
[...]
2018/12/15 14:11:30 Query executed in 0.069387s
undefined
```
# Credits
Big thanks to:
- [robertkrimen/otto](https://github.com/robertkrimen/otto) for the embedded JavaScript interpreter.
- [llir/llvm](https://github.com/llir/llvm) for the LLVM IR parser.