https://github.com/jkrt/llvmpasses
Simple trivial example on how to run an LLVM module and LLVM function pass
https://github.com/jkrt/llvmpasses
Last synced: about 1 year ago
JSON representation
Simple trivial example on how to run an LLVM module and LLVM function pass
- Host: GitHub
- URL: https://github.com/jkrt/llvmpasses
- Owner: JKRT
- License: mit
- Created: 2019-01-28T17:15:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-03-05T11:50:27.000Z (over 5 years ago)
- Last Synced: 2025-01-29T05:32:24.089Z (over 1 year ago)
- Language: C++
- Size: 9.77 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LLVMPasses
Simple trivial example on how to run an LLVM module and LLVM function pass using LLVM 6.
Run by executing
make runFunctionPassOnTestFile
Or
make runModulePassOnTestfile
LLVM 6.0 and it's dependencies are needed for this to work.
# Note
If you get the following error
```
opt: CommandLine Error: Option 'debug-pass' registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options
make: *** [Makefile:19: runFunctionPassOnTestFile] Error 1
```
This is most likley due to llvm reporting the following when issuing the following command:
```
./bin/llvm-config --shared-mode
static
```
If this is the case, modify the makefile as follows
```
LLVM_INCLUDEDIR = `llvm-config --includedir`
LLVM_FLAGS = `llvm-config --cxxflags`
```