0
votes

I'm trying to understand the names of different parts of popular compilers. The compilers I'm comparing are the GNU Compiler Collection, Apple LLVM, and Microsoft Visual C++. (Are these the correct names for the compilers?) Is the following table correct:

GCC Apple LLVM MSVC
Backend GCC LLVM MSVC
C frontend gcc clang MSVC
C++ frontend g++ clang++ MSVC

Also; if I'm compiling my C++ source files with the command clang++ on a mac:

$ clang++ --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

what's the name of the compiler I'm using? Should I say I'm using Apple Clang? Or Apple LLVM? Or something else?

1
I thought Microsoft's was CL.EXE (for Compiler/Linker).Eljay
Microsoft uses cl.exe as the compiler driver. The C front end (c1.dll), C++ front end (c1xx.dll), and compiler back end (c2.dll) are separate DLLs loaded by cl.exe.1201ProgramAlarm
I think you may be trying for more more order than exists. The LLVM developers don't distinguish reliably between C and C++; someone who talks about a C++-specific feature or bug will often say "clang does …" or "gcc behaves …". Maybe they should distinguish, but then again, maybe people should be more careful about that and which too. You yourself could say you're using apple clang 10.0.1 on macos 10.4.1, but actually drop some precision.arnt
No, in my opinion either is okay. There is no single term that's used by such a majority that it can be called the correct term. People are using untidy phrasing, for good and bad.arnt
Part of the problem seems to be an artificial distinction in two parts (front-end/back-end). Compilers really need a parsing front-end and a code-generation back-end, but there can be intermediate steps in between the two. Even when there are just those two parts, the exact division of responsibilities might differ between compilers. Tasks that belong in the frontend of compiler A might be in the backend of compiler B, e.g. handling intrinsics.MSalters

1 Answers

1
votes

This seems to answer the question:

GCC Apple LLVM MSVC
Backend GCC LLVM c2.dll
C frontend gcc clang c1.dll
C++ frontend g++ clang++ c1xx.dll