[Lldb-commits] [lldb] r245398 - Update to r245397.
Chaoren Lin via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 18 18:24:57 PDT 2015
Author: chaoren
Date: Tue Aug 18 20:24:57 2015
New Revision: 245398
URL: http://llvm.org/viewvc/llvm-project?rev=245398&view=rev
Log:
Update to r245397.
`ast_transformer` could be null, in which case we should initialize
`m_code_generator` with the ASTContext.
Modified:
lldb/trunk/source/Expression/ClangExpressionParser.cpp
Modified: lldb/trunk/source/Expression/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionParser.cpp?rev=245398&r1=245397&r2=245398&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionParser.cpp Tue Aug 18 20:24:57 2015
@@ -410,15 +410,20 @@ ClangExpressionParser::Parse (Stream &st
diag_buf->BeginSourceFile(m_compiler->getLangOpts(), &m_compiler->getPreprocessor());
ASTConsumer *ast_transformer = m_expr.ASTTransformer(m_code_generator.get());
- ast_transformer->Initialize(m_compiler->getASTContext());
if (ClangExpressionDeclMap *decl_map = m_expr.DeclMap())
decl_map->InstallCodeGenerator(m_code_generator.get());
-
+
if (ast_transformer)
+ {
+ ast_transformer->Initialize(m_compiler->getASTContext());
ParseAST(m_compiler->getPreprocessor(), ast_transformer, m_compiler->getASTContext());
+ }
else
+ {
+ m_code_generator->Initialize(m_compiler->getASTContext());
ParseAST(m_compiler->getPreprocessor(), m_code_generator.get(), m_compiler->getASTContext());
+ }
diag_buf->EndSourceFile();
More information about the lldb-commits
mailing list