llvm-analysis-and-transform-passes icon indicating copy to clipboard operation
llvm-analysis-and-transform-passes copied to clipboard

How does it work?

Open chy-crypto opened this issue 6 years ago • 5 comments

I wonder what does the project want to do? thanks

chy-crypto avatar Jan 31 '19 16:01 chy-crypto

when I compile it in clang and llvm in 6.0, it fails and informations are following

====================[ Build | llvm_analysis_and_transform_passes | Debug ]====== /usr/local/bin/cmake --build /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/cmake-build-debug --target llvm_analysis_and_transform_passes -- -j 6 [ 5%] Linking CXX executable llvm_analysis_and_transform_passes CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp:496: multiple definition of info_arch' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:509: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp:270: multiple definition of info_compiler' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:283: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp:501: multiple definition of info_language_dialect_default' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:527: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp:495: multiple definition of info_platform' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:508: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: In function main': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp:514: multiple definition of main' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:540: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/feature_tests.c.o: In function main': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/feature_tests.c:34: multiple definition of main' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:540: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/feature_tests.cxx.o: In function main': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/feature_tests.cxx:405: multiple definition of main' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:540: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/heaptime/main.cpp.o: In function main': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/heaptime/main.cpp:27: multiple definition of main' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:540: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/HeapTimeTestProgram/main.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/HeapTimeTestProgram/main.cpp:23: multiple definition of SIZE' CMakeFiles/llvm_analysis_and_transform_passes.dir/heaptime/main.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/heaptime/main.cpp:23: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/HeapTimeTestProgram/main.cpp.o: In function reheapifyUpward(int*, int)': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/HeapTimeTestProgram/main.cpp:100: multiple definition of reheapifyUpward(int*, int)' CMakeFiles/llvm_analysis_and_transform_passes.dir/heaptime/main.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/heaptime/main.cpp:100: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/HeapTimeTestProgram/main.cpp.o: In function findBigChildIndex(int, int*, int)': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/HeapTimeTestProgram/main.cpp:127: multiple definition of findBigChildIndex(int, int*, int)' CMakeFiles/llvm_analysis_and_transform_passes.dir/heaptime/main.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/heaptime/main.cpp:127: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/HeapTimeTestProgram/main.cpp.o: In function reheapifyDownward(int*, int)': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/HeapTimeTestProgram/main.cpp:165: multiple definition of reheapifyDownward(int*, int)' CMakeFiles/llvm_analysis_and_transform_passes.dir/heaptime/main.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/heaptime/main.cpp:165: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/HeapTimeTestProgram/main.cpp.o: In function sort(int*, int)': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/HeapTimeTestProgram/main.cpp:76: multiple definition of sort(int*, int)' CMakeFiles/llvm_analysis_and_transform_passes.dir/heaptime/main.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/heaptime/main.cpp:76: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/HeapTimeTestProgram/main.cpp.o: In function sortHeap(int*, int)': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/HeapTimeTestProgram/main.cpp:194: multiple definition of sortHeap(int*, int)' CMakeFiles/llvm_analysis_and_transform_passes.dir/heaptime/main.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/heaptime/main.cpp:194: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/HeapTimeTestProgram/main.cpp.o: In function buildHeap(int*, int)': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/HeapTimeTestProgram/main.cpp:91: multiple definition of buildHeap(int*, int)' CMakeFiles/llvm_analysis_and_transform_passes.dir/heaptime/main.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/heaptime/main.cpp:91: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/HeapTimeTestProgram/main.cpp.o: In function main': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/HeapTimeTestProgram/main.cpp:27: multiple definition of main' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:540: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/HeapTimeTestProgram/main.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/HeapTimeTestProgram/main.cpp:24: multiple definition of x' CMakeFiles/llvm_analysis_and_transform_passes.dir/heaptime/main.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/heaptime/main.cpp:24: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/smalltest/smallProgram.c.o: In function main': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/smalltest/smallProgram.c:12: multiple definition of main' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:540: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/SmallTestProgram/print.c.o: In function ALL': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/SmallTestProgram/print.c:5: multiple definition of ALL' CMakeFiles/llvm_analysis_and_transform_passes.dir/smalltest/print.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/smalltest/print.c:5: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/SmallTestProgram/print.c.o: In function BO': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/SmallTestProgram/print.c:2: multiple definition of BO' CMakeFiles/llvm_analysis_and_transform_passes.dir/smalltest/print.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/smalltest/print.c:2: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/SmallTestProgram/print.c.o: In function BRAN': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/SmallTestProgram/print.c:8: multiple definition of BRAN' CMakeFiles/llvm_analysis_and_transform_passes.dir/smalltest/print.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/smalltest/print.c:8: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/SmallTestProgram/print.c.o: In function CALL': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/SmallTestProgram/print.c:17: multiple definition of CALL' CMakeFiles/llvm_analysis_and_transform_passes.dir/smalltest/print.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/smalltest/print.c:17: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/SmallTestProgram/print.c.o: In function INST': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/SmallTestProgram/print.c:20: multiple definition of INST' CMakeFiles/llvm_analysis_and_transform_passes.dir/smalltest/print.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/smalltest/print.c:20: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/SmallTestProgram/print.c.o: In function LOAD': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/SmallTestProgram/print.c:11: multiple definition of LOAD' CMakeFiles/llvm_analysis_and_transform_passes.dir/smalltest/print.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/smalltest/print.c:11: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/SmallTestProgram/print.c.o: In function STORE': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/SmallTestProgram/print.c:14: multiple definition of STORE' CMakeFiles/llvm_analysis_and_transform_passes.dir/smalltest/print.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/smalltest/print.c:14: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/SmallTestProgram/smallProgram.c.o: In function bar': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/SmallTestProgram/smallProgram.c:43: multiple definition of bar' CMakeFiles/llvm_analysis_and_transform_passes.dir/smalltest/smallProgram.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/smalltest/smallProgram.c:43: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/SmallTestProgram/smallProgram.c.o: In function foo': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/SmallTestProgram/smallProgram.c:34: multiple definition of foo' CMakeFiles/llvm_analysis_and_transform_passes.dir/smalltest/smallProgram.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/smalltest/smallProgram.c:34: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/SmallTestProgram/smallProgram.c.o: In function main': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/SmallTestProgram/smallProgram.c:12: multiple definition of main' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:540: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:509: multiple definition of info_arch' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:509: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:283: multiple definition of info_compiler' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:283: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:527: multiple definition of info_language_dialect_default' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:527: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:508: multiple definition of info_platform' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:508: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:470: multiple definition of info_version' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:470: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o: In function main': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:540: multiple definition of main' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:540: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp:496: multiple definition of info_arch' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:509: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp:270: multiple definition of info_compiler' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:283: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp:501: multiple definition of info_language_dialect_default' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:527: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp:495: multiple definition of info_platform' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:508: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp.o: In function main': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp:514: multiple definition of main' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:540: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/feature_tests.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/feature_tests.c:2: multiple definition of features' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/feature_tests.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/feature_tests.c:2: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/feature_tests.c.o: In function main': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/feature_tests.c:34: multiple definition of main' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:540: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/CMakeFiles/feature_tests.cxx.o: In function main': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/CMakeFiles/feature_tests.cxx:405: multiple definition of main' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c:540: first defined here CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function RegisterPass': /usr/include/llvm/PassSupport.h:98: undefined reference to llvm::PassRegistry::getPassRegistry()' /usr/include/llvm/PassSupport.h:98: undefined reference to llvm::PassRegistry::registerPass(llvm::PassInfo const&, bool)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function ~CountStats': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/DynCount.cpp:23: undefined reference to llvm::ModulePass::~ModulePass()' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function (anonymous namespace)::CountStats::runOnFunction(llvm::Function&, llvm::Module&)': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/DynCount.cpp:49: undefined reference to llvm::Function::getContext() const' /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/DynCount.cpp:51: undefined reference to llvm::Type::getVoidTy(llvm::LLVMContext&)' /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/DynCount.cpp:53: undefined reference to llvm::Type::getVoidTy(llvm::LLVMContext&)' /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/DynCount.cpp:55: undefined reference to llvm::Type::getVoidTy(llvm::LLVMContext&)' /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/DynCount.cpp:57: undefined reference to llvm::Type::getVoidTy(llvm::LLVMContext&)' /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/DynCount.cpp:59: undefined reference to llvm::Type::getVoidTy(llvm::LLVMContext&)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/DynCount.cpp:61: more undefined references to llvm::Type::getVoidTy(llvm::LLVMContext&)' follow CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function ModulePass': /usr/include/llvm/Pass.h:227: undefined reference to vtable for llvm::ModulePass' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function Pass': /usr/include/llvm/Pass.h:87: undefined reference to vtable for llvm::Pass' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function IRBuilder': /usr/include/llvm/IR/IRBuilder.h:696: undefined reference to llvm::Value::getContext() const' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function llvm::Constant* llvm::Module::getOrInsertFunction(llvm::StringRef, llvm::AttributeList, llvm::Type*, long)': /usr/include/llvm/IR/Module.h:346: undefined reference to llvm::FunctionType::get(llvm::Type*, llvm::ArrayRef<llvm::Type*>, bool)' /usr/include/llvm/IR/Module.h:345: undefined reference to llvm::Module::getOrInsertFunction(llvm::StringRef, llvm::FunctionType*, llvm::AttributeList)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function llvm::SmallVectorTemplateCommon<llvm::Type*, void>::grow_pod(unsigned long, unsigned long)': /usr/include/llvm/ADT/SmallVector.h:83: undefined reference to llvm::SmallVectorBase::grow_pod(void*, unsigned long, unsigned long)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function llvm::MetadataTracking::untrack(llvm::Metadata*&)': /usr/include/llvm/IR/Metadata.h:244: undefined reference to llvm::MetadataTracking::untrack(void*, llvm::Metadata&)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function llvm::MetadataTracking::retrack(llvm::Metadata*&, llvm::Metadata*&)': /usr/include/llvm/IR/Metadata.h:256: undefined reference to llvm::MetadataTracking::retrack(void*, llvm::Metadata&, void*)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function llvm::MetadataTracking::track(llvm::Metadata*&)': /usr/include/llvm/IR/Metadata.h:220: undefined reference to llvm::MetadataTracking::track(void*, llvm::Metadata&, llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*>)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function llvm::CallInst::Create(llvm::FunctionType*, llvm::Value*, llvm::ArrayRef<llvm::Value*>, llvm::ArrayRef<llvm::OperandBundleDefT<llvm::Value*> >, llvm::Twine const&, llvm::Instruction*)': /usr/include/llvm/IR/Instructions.h:1443: undefined reference to llvm::User::operator new(unsigned long, unsigned int, unsigned int)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function llvm::IRBuilder<llvm::ConstantFolder, llvm::IRBuilderDefaultInserter>::AddFPMathAttributes(llvm::Instruction*, llvm::MDNode*, llvm::FastMathFlags) const': /usr/include/llvm/IR/IRBuilder.h:887: undefined reference to llvm::Instruction::setMetadata(unsigned int, llvm::MDNode*)' /usr/include/llvm/IR/IRBuilder.h:888: undefined reference to llvm::Instruction::setFastMathFlags(llvm::FastMathFlags)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function CallInst': /usr/include/llvm/IR/Instructions.h:1950: undefined reference to llvm::Instruction::Instruction(llvm::Type*, unsigned int, llvm::Use*, unsigned int, llvm::Instruction*)' /usr/include/llvm/IR/Instructions.h:1955: undefined reference to llvm::CallInst::init(llvm::FunctionType*, llvm::Value*, llvm::ArrayRefllvm::Value*, llvm::ArrayRef<llvm::OperandBundleDefTllvm::Value* >, llvm::Twine const&)' /usr/include/llvm/IR/Instructions.h:1956: undefined reference to llvm::Instruction::~Instruction()' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function llvm::IRBuilderDefaultInserter::InsertHelper(llvm::Instruction*, llvm::Twine const&, llvm::BasicBlock*, llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, false>) const': /usr/include/llvm/IR/IRBuilder.h:68: undefined reference to llvm::Value::setName(llvm::Twine const&)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o: In function llvm::iplist_impl<llvm::simple_ilistllvm::Instruction, llvm::SymbolTableListTraitsllvm::Instruction >::insert(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::Instruction, false, false, void>, false, false>, llvm::Instruction*)': /usr/include/llvm/ADT/ilist.h:242: undefined reference to llvm::SymbolTableListTraits<llvm::Instruction>::addNodeToList(llvm::Instruction*)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.data+0x0): undefined reference to llvm::DisableABIBreakingChecks' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x20): undefined reference to llvm::Pass::getPassName() const' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x38): undefined reference to llvm::Pass::print(llvm::raw_ostream&, llvm::Module const*) const' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x40): undefined reference to llvm::ModulePass::createPrinterPass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x48): undefined reference to llvm::ModulePass::assignPassManager(llvm::PMStack&, llvm::PassManagerType)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x50): undefined reference to llvm::Pass::preparePassManager(llvm::PMStack&)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x58): undefined reference to llvm::ModulePass::getPotentialPassManagerType() const' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x60): undefined reference to llvm::Pass::getAnalysisUsage(llvm::AnalysisUsage&) const' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x68): undefined reference to llvm::Pass::releaseMemory()' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x70): undefined reference to llvm::Pass::getAdjustedAnalysisPointer(void const*)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x78): undefined reference to llvm::Pass::getAsImmutablePass()' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x80): undefined reference to llvm::Pass::getAsPMDataManager()' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x88): undefined reference to llvm::Pass::verifyAnalysis() const' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0x90): undefined reference to llvm::Pass::dumpPassStructure(unsigned int)' CMakeFiles/llvm_analysis_and_transform_passes.dir/DynCount/DynCount.cpp.o:(.rodata+0xd0): undefined reference to typeinfo for llvm::ModulePass' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o: In function RegisterPass': /usr/include/llvm/PassSupport.h:98: undefined reference to llvm::PassRegistry::getPassRegistry()' /usr/include/llvm/PassSupport.h:98: undefined reference to llvm::PassRegistry::registerPass(llvm::PassInfo const&, bool)' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o: In function ~CountStats': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/StaticCount.cpp:26: undefined reference to llvm::ModulePass::~ModulePass()' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o: In function (anonymous namespace)::CountStats::runOnFunction(llvm::Function&, llvm::Module&)': /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/StaticCount.cpp:64: undefined reference to llvm::errs()' /mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/StaticCount/StaticCount.cpp:64: undefined reference to llvm::raw_ostream::write_escaped(llvm::StringRef, bool)' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o: In function llvm::Statistic::init()': /usr/include/llvm/ADT/Statistic.h:151: undefined reference to llvm::sys::MemoryFence()' /usr/include/llvm/ADT/Statistic.h:152: undefined reference to llvm::Statistic::RegisterStatistic()' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o: In function llvm::Instruction::getOpcodeName() const': /usr/include/llvm/IR/Instruction.h:128: undefined reference to llvm::Instruction::getOpcodeName(unsigned int)' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o: In function llvm::raw_ostream::operator<<(char)': /usr/include/llvm/Support/raw_ostream.h:147: undefined reference to llvm::raw_ostream::write(unsigned char)' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.data+0x0): undefined reference to llvm::DisableABIBreakingChecks' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x20): undefined reference to llvm::Pass::getPassName() const' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x38): undefined reference to llvm::Pass::print(llvm::raw_ostream&, llvm::Module const*) const' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x40): undefined reference to llvm::ModulePass::createPrinterPass(llvm::raw_ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x48): undefined reference to llvm::ModulePass::assignPassManager(llvm::PMStack&, llvm::PassManagerType)' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x50): undefined reference to llvm::Pass::preparePassManager(llvm::PMStack&)' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x58): undefined reference to llvm::ModulePass::getPotentialPassManagerType() const' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x60): undefined reference to llvm::Pass::getAnalysisUsage(llvm::AnalysisUsage&) const' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x68): undefined reference to llvm::Pass::releaseMemory()' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x70): undefined reference to llvm::Pass::getAdjustedAnalysisPointer(void const*)' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x78): undefined reference to llvm::Pass::getAsImmutablePass()' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x80): undefined reference to llvm::Pass::getAsPMDataManager()' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x88): undefined reference to llvm::Pass::verifyAnalysis() const' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0x90): undefined reference to llvm::Pass::dumpPassStructure(unsigned int)' CMakeFiles/llvm_analysis_and_transform_passes.dir/StaticCount/StaticCount.cpp.o:(.rodata+0xd0): undefined reference to typeinfo for llvm::ModulePass' CMakeFiles/llvm_analysis_and_transform_passes.dir/build.make:308: recipe for target 'llvm_analysis_and_transform_passes' failed clang: error: linker command failed with exit code 1 (use -v to see invocation) make[3]: *** [llvm_analysis_and_transform_passes] Error 1 CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/llvm_analysis_and_transform_passes.dir/all' failed CMakeFiles/Makefile2:84: recipe for target 'CMakeFiles/llvm_analysis_and_transform_passes.dir/rule' failed Makefile:118: recipe for target 'llvm_analysis_and_transform_passes' failed make[2]: *** [CMakeFiles/llvm_analysis_and_transform_passes.dir/all] Error 2 make[1]: *** [CMakeFiles/llvm_analysis_and_transform_passes.dir/rule] Error 2 make: *** [llvm_analysis_and_transform_passes] Error 2

chy-crypto avatar Feb 01 '19 01:02 chy-crypto

@SongBiu

  1. You must copy the relevant library files from the repo into your local LLVM library directory (where the .dylib files are)
  2. You can build it to there instead, this is the better option given the different versions of LLVM
  3. Check version numbers this repo is rarely updated
  4. Remove duplicates including intermediate files of all types
  5. Please keep me updated

fhboswell avatar Feb 01 '19 02:02 fhboswell

@SongBiu

  1. You must copy the relevant library files from the repo into your local LLVM library directory (where the .dylib files are)
  2. You can build it to there instead, this is the better option given the different versions of LLVM
  3. Check version numbers this repo is rarely updated
  4. Remove duplicates including intermediate files of all types
  5. Please keep me updated

Thanks, I will try as your introduction

chy-crypto avatar Feb 01 '19 08:02 chy-crypto

@SongBiu

  1. You must copy the relevant library files from the repo into your local LLVM library directory (where the .dylib files are)
  2. You can build it to there instead, this is the better option given the different versions of LLVM
  3. Check version numbers this repo is rarely updated
  4. Remove duplicates including intermediate files of all types
  5. Please keep me updated

When I compile it, it throw errors:

/mnt/c/Users/songl/Documents/github/llvm-analysis-and-transform-passes/DynCount/CMakeFiles/feature_tests.cxx:396:72: error: missing binary operator before token "(" #if ((clang_major * 100) + clang_minor) >= 400 && __has_feature(cxx_variadic_templates)

chy-crypto avatar Feb 08 '19 03:02 chy-crypto

What compiler are you using on what system?

fhboswell avatar Jun 05 '19 07:06 fhboswell