I want clang to compile my C/C++ code to LLVM bytecode rather than binary executable. How can I achieve that? And if I get the LLVM by
C/C++
LLVM
Did you read clang documentation ? You're probably looking for -emit-llvm.
-emit-llvm