Answer the question
In order to leave comments, you need to log in
Clang and LLVM. What is it?
Hello! After a little googling, I came to the conclusion that Clang is a code generator that receives a cpp file as input, and we have some kind of intermediate code as output. But LLVM can already execute or compile this code.
But I am tormented by vague doubts! Help, please, to understand!
Answer the question
In order to leave comments, you need to log in
Yes you are right. Clang is a frontend that generates an intermediate representation. LLVM takes an intermediate representation (regardless of the language in which the original code was written), optimizes and generates a binary file.
GCC uses a similar system (before clang, LLVM generally accepted IF from GCC). This allows you to have one backend for multiple languages. In fact, only the parser has to be developed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question