[Lldb-commits] [lldb] r263107 - Revert "Track expression language from one place in ClangExpressionParser"
Ewan Crawford via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 10 04:38:57 PST 2016
Author: ewancrawford
Date: Thu Mar 10 06:38:55 2016
New Revision: 263107
URL: http://llvm.org/viewvc/llvm-project?rev=263107&view=rev
Log:
Revert "Track expression language from one place in ClangExpressionParser"
r263099 seems to have broken some OSX tests
Modified:
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp?rev=263107&r1=263106&r2=263107&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Thu Mar 10 06:38:55 2016
@@ -157,7 +157,7 @@ ClangExpressionParser::ClangExpressionPa
// 1. Create a new compiler instance.
m_compiler.reset(new CompilerInstance());
- m_language = expr.Language(); // defaults to lldb::eLanguageTypeUnknown
+ lldb::LanguageType frame_lang = expr.Language(); // defaults to lldb::eLanguageTypeUnknown
bool overridden_target_opts = false;
lldb_private::LanguageRuntime *lang_rt = nullptr;
lldb::TargetSP target_sp;
@@ -176,14 +176,14 @@ ClangExpressionParser::ClangExpressionPa
// Make sure the user hasn't provided a preferred execution language
// with `expression --language X -- ...`
- if (frame && m_language == lldb::eLanguageTypeUnknown)
- m_language = frame->GetLanguage();
+ if (frame && frame_lang == lldb::eLanguageTypeUnknown)
+ frame_lang = frame->GetLanguage();
- if (m_language != lldb::eLanguageTypeUnknown)
+ if (frame_lang != lldb::eLanguageTypeUnknown)
{
- lang_rt = exe_scope->CalculateProcess()->GetLanguageRuntime(m_language);
+ lang_rt = exe_scope->CalculateProcess()->GetLanguageRuntime(frame_lang);
if (log)
- log->Printf("Frame has language of type %s", Language::GetNameForLanguageType(m_language));
+ log->Printf("Frame has language of type %s", Language::GetNameForLanguageType(frame_lang));
}
// 2. Configure the compiler with a set of default options that are appropriate
@@ -263,7 +263,9 @@ ClangExpressionParser::ClangExpressionPa
assert (m_compiler->hasTarget());
// 5. Set language options.
- switch (m_language)
+ lldb::LanguageType language = expr.Language();
+
+ switch (language)
{
case lldb::eLanguageTypeC:
case lldb::eLanguageTypeC89:
Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h?rev=263107&r1=263106&r2=263107&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h Thu Mar 10 06:38:55 2016
@@ -129,8 +129,6 @@ private:
class LLDBPreprocessorCallbacks;
LLDBPreprocessorCallbacks *m_pp_callbacks; ///< Called when the preprocessor encounters module imports
std::unique_ptr<ClangASTContext> m_ast_context;
- lldb::LanguageType m_language; ///< The the source language of the expression
- /// which may be explicitly set or inferred.
};
}
More information about the lldb-commits
mailing list