Skip to content
Snippets Groups Projects
Commit 76ab0a6b authored by Zuzana Baranová's avatar Zuzana Baranová
Browse files

CC: Use ClangDriver in Driver::getJobs().

parent a72c9a92
No related branches found
No related tags found
No related merge requests found
...@@ -46,14 +46,11 @@ static std::vector< std::string > mergeFlags( Xs &&... xs ) { ...@@ -46,14 +46,11 @@ static std::vector< std::string > mergeFlags( Xs &&... xs ) {
std::vector< Command > Driver::getJobs( llvm::ArrayRef< const char * > args ) std::vector< Command > Driver::getJobs( llvm::ArrayRef< const char * > args )
{ {
using clang::driver::Driver;
using clang::driver::Compilation; using clang::driver::Compilation;
ClangDriver drv;
Diagnostics diag;
clang::driver::Driver drv( "/usr/bin/false", LLVM_HOST_TRIPLE, diag.engine );
Compilation* c = drv.BuildCompilation( args ); Compilation* c = drv.BuildCompilation( args );
if ( diag.engine.hasErrorOccurred() ) if ( drv.diag.engine.hasErrorOccurred() )
throw cc::CompileError( "failed to get linker arguments, aborting" ); throw cc::CompileError( "failed to get linker arguments, aborting" );
std::vector< Command > clangJobs; std::vector< Command > clangJobs;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment