Comments (1)
I found the problem. I didn't follow your instruction completely.
I changed /skeleton/CMakefile.txt
. The line target_compile_features(SkeletonPass PRIVATE cxx_range_for cxx_auto_type)
should not be omitted.
Then I run commands as follows:
(base) fdse@ubuntu:~/luorong/LLVM/test/llvm-pass-skeleton/build$ cmake ..
-- Configuring done
-- Generating done
-- Build files have been written to: /home/fdse/luorong/LLVM/test/llvm-pass-skeleton/build
(base) fdse@ubuntu:~/luorong/LLVM/test/llvm-pass-skeleton/build$ make
Consolidate compiler generated dependencies of target SkeletonPass
[ 50%] Building CXX object skeleton/CMakeFiles/SkeletonPass.dir/Skeleton.cpp.o
[100%] Linking CXX shared module libSkeletonPass.so
[100%] Built target SkeletonPass
(base) fdse@ubuntu:~/luorong/LLVM/test/llvm-pass-skeleton/build$ cd skeleton/
(base) fdse@ubuntu:~/luorong/LLVM/test/llvm-pass-skeleton/build/skeleton$ ls
CMakeFiles cmake_install.cmake libSkeletonPass.so Makefile
(base) fdse@ubuntu:~/luorong/LLVM/test/llvm-pass-skeleton/build/skeleton$ opt -load ./libSkeletonPass.so -help | grep skeleton
--skeleton - a useless pass
(base) fdse@ubuntu:~/luorong/LLVM/test/llvm-pass-skeleton/build/skeleton$ cd ../../src
(base) fdse@ubuntu:~/luorong/LLVM/test/llvm-pass-skeleton/src$ clang++ -O0 -g -S -emit-llvm demo.cpp -o demo.ll
(base) fdse@ubuntu:~/luorong/LLVM/test/llvm-pass-skeleton/src$ ls
demo.cpp demo.ll
(base) fdse@ubuntu:~/luorong/LLVM/test/llvm-pass-skeleton/src$ opt -load ../build/skeleton/libSkeletonPass.so -skeleton demo.ll -enable-new-pm=0
WARNING: You're attempting to print out a bitcode file.
This is inadvisable as it may cause display problems. If
you REALLY want to taste LLVM bitcode first-hand, you
can force output with the `-f' option.
I saw a function called _Z5func2v!
I saw a function called _Z4funcv!
I saw a function called main!
from llvm-pass-skeleton.
Related Issues (20)
- Running annotation module HOT 1
- Fatal Error For Attributes.gen HOT 6
- Unable to run the program HOT 3
- Compile error in the rtlib branch HOT 1
- Error while running the program HOT 7
- Error while making rtlib example HOT 6
- Error while compiling HOT 1
- Support for iOS in XCODE HOT 2
- Getting error : undefined symbol: _ZN4llvm23EnableABIBreakingChecksE HOT 1
- llvm instrumentation HOT 3
- instrumentation: Linking With a Runtime Library HOT 1
- error: clang frontend command failed due to signal (use -v to see invocation) HOT 1
- Cmake for the "mutate" branch needs C++ 14 support
- Clang 14.0.5 unable to execute command: Aborted HOT 1
- fixes for version 15? HOT 1
- Now Make the Pass Do Something Mildly Interesting HOT 1
- ModulePasses with Auto Registration HOT 31
- Using C++ files for rtlib HOT 11
- The imported target "LLVMSupport" references the file "/usr/lib/libLLVMSupport.a" Error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llvm-pass-skeleton.