[Lldb-commits] [lldb] r212391 - Track changes from clang r212388
Alp Toker
alp at nuanti.com
Sat Jul 5 22:36:58 PDT 2014
Author: alp
Date: Sun Jul 6 00:36:57 2014
New Revision: 212391
URL: http://llvm.org/viewvc/llvm-project?rev=212391&view=rev
Log:
Track changes from clang r212388
Modified:
lldb/trunk/include/lldb/Symbol/ClangASTContext.h
lldb/trunk/source/Expression/ClangExpressionParser.cpp
lldb/trunk/source/Symbol/ClangASTContext.cpp
Modified: lldb/trunk/include/lldb/Symbol/ClangASTContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/ClangASTContext.h?rev=212391&r1=212390&r2=212391&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/ClangASTContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/ClangASTContext.h Sun Jul 6 00:36:57 2014
@@ -71,8 +71,7 @@ public:
clang::DiagnosticConsumer *
getDiagnosticConsumer();
- clang::TargetOptions *
- getTargetOptions();
+ std::shared_ptr<clang::TargetOptions> &getTargetOptions();
clang::TargetInfo *
getTargetInfo();
Modified: lldb/trunk/source/Expression/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionParser.cpp?rev=212391&r1=212390&r2=212391&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionParser.cpp Sun Jul 6 00:36:57 2014
@@ -154,9 +154,9 @@ ClangExpressionParser::ClangExpressionPa
m_compiler->createDiagnostics();
// Create the target instance.
- m_compiler->setTarget(TargetInfo::CreateTargetInfo(m_compiler->getDiagnostics(),
- &m_compiler->getTargetOpts()));
-
+ m_compiler->setTarget(TargetInfo::CreateTargetInfo(
+ m_compiler->getDiagnostics(), m_compiler->getInvocation().TargetOpts));
+
assert (m_compiler->hasTarget());
// 3. Set options.
Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=212391&r1=212390&r2=212391&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Sun Jul 6 00:36:57 2014
@@ -499,17 +499,14 @@ ClangASTContext::getDiagnosticConsumer()
return m_diagnostic_consumer_ap.get();
}
-TargetOptions *
-ClangASTContext::getTargetOptions()
-{
+std::shared_ptr<TargetOptions> &ClangASTContext::getTargetOptions() {
if (m_target_options_rp.get() == nullptr && !m_target_triple.empty())
{
- m_target_options_rp.reset ();
- m_target_options_rp = new TargetOptions();
+ m_target_options_rp = std::make_shared<TargetOptions>();
if (m_target_options_rp.get() != nullptr)
m_target_options_rp->Triple = m_target_triple;
}
- return m_target_options_rp.get();
+ return m_target_options_rp;
}
More information about the lldb-commits
mailing list