Definition at line 199 of file UdfCompiler.cpp.
anonymous_namespace{UdfCompiler.cpp}::UdfClangDriver::UdfClangDriver |
( |
const UdfClangDriver & |
| ) |
|
|
delete |
anonymous_namespace{UdfCompiler.cpp}::UdfClangDriver::UdfClangDriver |
( |
const std::string & |
clang_path, |
|
|
llvm::IntrusiveRefCntPtr< clang::DiagnosticOptions > |
diag_options |
|
) |
| |
|
protected |
Definition at line 233 of file UdfCompiler.cpp.
References anonymous_namespace{UdfCompiler.cpp}::exec_output(), LOG, the_driver, and logger::WARNING.
238 ,
diag_id(
new clang::DiagnosticIDs())
241 ,
the_driver(clang_path.c_str(), llvm::sys::getDefaultTargetTriple(),
diags)
245 if (!boost::filesystem::exists(
the_driver.ResourceDir)) {
247 <<
" does not exist";
252 std::string clang_resource_dir =
exec_output(clang_path +
" -print-resource-dir");
255 clang_resource_dir.erase(
256 std::find_if(clang_resource_dir.rbegin(),
257 clang_resource_dir.rend(),
258 [](
unsigned char ch) {
return !std::isspace(ch); })
260 clang_resource_dir.end());
262 if (clang_resource_dir !=
the_driver.ResourceDir) {
263 LOG(
WARNING) <<
"Resetting clang driver ResourceDir to " << clang_resource_dir
std::unique_ptr< clang::DiagnosticConsumer > diag_client_owner
clang::DiagnosticsEngine diags
llvm::IntrusiveRefCntPtr< clang::DiagnosticIDs > diag_id
clang::driver::Driver the_driver
std::string exec_output(std::string cmd)
std::tuple< int, int, int > get_clang_version(const std::string &clang_path)
std::tuple< int, int, int > clang_version
clang::DiagnosticConsumer * diag_client
llvm::IntrusiveRefCntPtr< clang::DiagnosticOptions > diag_options
clang::driver::Driver* anonymous_namespace{UdfCompiler.cpp}::UdfClangDriver::getClangDriver |
( |
| ) |
|
|
inline |
std::tuple<int, int, int> anonymous_namespace{UdfCompiler.cpp}::UdfClangDriver::getClangVersion |
( |
| ) |
const |
|
inline |
UdfClangDriver anonymous_namespace{UdfCompiler.cpp}::UdfClangDriver::init |
( |
const std::string & |
clang_path | ) |
|
|
static |
Definition at line 222 of file UdfCompiler.cpp.
223 llvm::IntrusiveRefCntPtr<clang::DiagnosticOptions>
diag_options =
224 new DiagnosticOptions();
226 throw std::runtime_error(
227 "Failed to initialize UDF compiler diagnostic options. Aborting UDF compiler "
228 "initialization. Is clang/clang++ installed?");
UdfClangDriver(const UdfClangDriver &)=delete
llvm::IntrusiveRefCntPtr< clang::DiagnosticOptions > diag_options
std::tuple<int, int, int> anonymous_namespace{UdfCompiler.cpp}::UdfClangDriver::clang_version |
|
private |
clang::DiagnosticConsumer* anonymous_namespace{UdfCompiler.cpp}::UdfClangDriver::diag_client |
|
private |
std::unique_ptr<clang::DiagnosticConsumer> anonymous_namespace{UdfCompiler.cpp}::UdfClangDriver::diag_client_owner |
|
private |
llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> anonymous_namespace{UdfCompiler.cpp}::UdfClangDriver::diag_id |
|
private |
llvm::IntrusiveRefCntPtr<clang::DiagnosticOptions> anonymous_namespace{UdfCompiler.cpp}::UdfClangDriver::diag_options |
|
private |
clang::DiagnosticsEngine anonymous_namespace{UdfCompiler.cpp}::UdfClangDriver::diags |
|
private |
clang::driver::Driver anonymous_namespace{UdfCompiler.cpp}::UdfClangDriver::the_driver |
|
private |
The documentation for this class was generated from the following file: