forked from OSchip/llvm-project
parent
06164dd854
commit
5f83864b7c
|
@ -71,8 +71,7 @@ public:
|
||||||
clang::DiagnosticConsumer *
|
clang::DiagnosticConsumer *
|
||||||
getDiagnosticConsumer();
|
getDiagnosticConsumer();
|
||||||
|
|
||||||
clang::TargetOptions *
|
std::shared_ptr<clang::TargetOptions> &getTargetOptions();
|
||||||
getTargetOptions();
|
|
||||||
|
|
||||||
clang::TargetInfo *
|
clang::TargetInfo *
|
||||||
getTargetInfo();
|
getTargetInfo();
|
||||||
|
|
|
@ -154,9 +154,9 @@ ClangExpressionParser::ClangExpressionParser (ExecutionContextScope *exe_scope,
|
||||||
m_compiler->createDiagnostics();
|
m_compiler->createDiagnostics();
|
||||||
|
|
||||||
// Create the target instance.
|
// Create the target instance.
|
||||||
m_compiler->setTarget(TargetInfo::CreateTargetInfo(m_compiler->getDiagnostics(),
|
m_compiler->setTarget(TargetInfo::CreateTargetInfo(
|
||||||
&m_compiler->getTargetOpts()));
|
m_compiler->getDiagnostics(), m_compiler->getInvocation().TargetOpts));
|
||||||
|
|
||||||
assert (m_compiler->hasTarget());
|
assert (m_compiler->hasTarget());
|
||||||
|
|
||||||
// 3. Set options.
|
// 3. Set options.
|
||||||
|
|
|
@ -499,17 +499,14 @@ ClangASTContext::getDiagnosticConsumer()
|
||||||
return m_diagnostic_consumer_ap.get();
|
return m_diagnostic_consumer_ap.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
TargetOptions *
|
std::shared_ptr<TargetOptions> &ClangASTContext::getTargetOptions() {
|
||||||
ClangASTContext::getTargetOptions()
|
|
||||||
{
|
|
||||||
if (m_target_options_rp.get() == nullptr && !m_target_triple.empty())
|
if (m_target_options_rp.get() == nullptr && !m_target_triple.empty())
|
||||||
{
|
{
|
||||||
m_target_options_rp.reset ();
|
m_target_options_rp = std::make_shared<TargetOptions>();
|
||||||
m_target_options_rp = new TargetOptions();
|
|
||||||
if (m_target_options_rp.get() != nullptr)
|
if (m_target_options_rp.get() != nullptr)
|
||||||
m_target_options_rp->Triple = m_target_triple;
|
m_target_options_rp->Triple = m_target_triple;
|
||||||
}
|
}
|
||||||
return m_target_options_rp.get();
|
return m_target_options_rp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue