Re: [llvm-dev] Where is the code that is called when clang calls the job which generates IR?

(Remembering to add llvm-dev this time…)

If you look at the argc/argv for the "2: compiler" case, the first option should be "-cc1" which will cause the driver to dispatch to cc1_main(), which is in
cc1_main.cpp.

--paulr

From: llvm-dev [mailto:[hidden email]]
On Behalf Of Rob bor78 via llvm-devSent: Thursday, July 05, 2018 10:25 AMTo:[hidden email]Subject: [llvm-dev] Where is the code that is called when clang calls the job which generates IR?

Where is the source code that is called when the clang binary executable calls the command/job which compiles C code to IR?

I am using Clang as a library (basically a simplified version of the main function in /tools/clang/tools/driver/driver.cpp).

My program creates an instance of clang::driver::Driver. I pass arguments to TheDriver.BuildCompilation(args)). And then call ExecuteCompilation. Everything works.