L
L
lksndr2015-10-19 11:31:19
C++ / C#
lksndr, 2015-10-19 11:31:19

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

1 answer(s)
M
MiiNiPaa, 2015-10-19
@lksndr

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 question

Ask a Question

731 491 924 answers to any question