hello,
i want to rewrite clang using c instead of c++,what’s your advice and what should i do first,and i want to know where’s the source codes of the files which will be read into the buffer to compiler?
thank you!
shines_tao wrote:
hello,
i want to rewrite clang using c instead of c++,what's your advice
Don't. This is a MASSIVE undertaking that's simply not worth it. If your worry is a lack of a C++ compiler for some platform, it's easier to port Clang to that platform. If your worry is company policy or something like that, it's probably easier to start a conspiracy that ends up with the whole management replaced with more C++-friendly people than to rewrite Clang and LLVM.
Sebastian
You could compile it with llvm-g++ and use the C backend to output C code for it.
-Chris