9191#include " lldb/Utility/StringList.h"
9292
9393#include " Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
94- #include " Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h"
9594
9695#include < cctype>
9796#include < memory>
@@ -396,7 +395,6 @@ ClangExpressionParser::ClangExpressionParser(
396395
397396 lldb::LanguageType frame_lang =
398397 expr.Language (); // defaults to lldb::eLanguageTypeUnknown
399- bool overridden_target_opts = false ;
400398 lldb_private::LanguageRuntime *lang_rt = nullptr ;
401399
402400 std::string abi;
@@ -464,34 +462,7 @@ ClangExpressionParser::ClangExpressionParser(
464462 if (!abi.empty ())
465463 m_compiler->getTargetOpts ().ABI = abi;
466464
467- // 3. Now allow the runtime to provide custom configuration options for the
468- // target. In this case, a specialized language runtime is available and we
469- // can query it for extra options. For 99% of use cases, this will not be
470- // needed and should be provided when basic platform detection is not enough.
471- // FIXME: Generalize this. Only RenderScriptRuntime currently supports this
472- // currently. Hardcoding this isn't ideal but it's better than LanguageRuntime
473- // having knowledge of clang::TargetOpts.
474- if (auto *renderscript_rt =
475- llvm::dyn_cast_or_null<RenderScriptRuntime>(lang_rt))
476- overridden_target_opts =
477- renderscript_rt->GetOverrideExprOptions (m_compiler->getTargetOpts ());
478-
479- if (overridden_target_opts)
480- if (log && log->GetVerbose ()) {
481- LLDB_LOGV (
482- log, " Using overridden target options for the expression evaluation" );
483-
484- auto opts = m_compiler->getTargetOpts ();
485- LLDB_LOGV (log, " Triple: '{0}'" , opts.Triple );
486- LLDB_LOGV (log, " CPU: '{0}'" , opts.CPU );
487- LLDB_LOGV (log, " FPMath: '{0}'" , opts.FPMath );
488- LLDB_LOGV (log, " ABI: '{0}'" , opts.ABI );
489- LLDB_LOGV (log, " LinkerVersion: '{0}'" , opts.LinkerVersion );
490- StringList::LogDump (log, opts.FeaturesAsWritten , " FeaturesAsWritten" );
491- StringList::LogDump (log, opts.Features , " Features" );
492- }
493-
494- // 4. Create and install the target on the compiler.
465+ // 3. Create and install the target on the compiler.
495466 m_compiler->createDiagnostics ();
496467 // Limit the number of error diagnostics we emit.
497468 // A value of 0 means no limit for both LLDB and Clang.
@@ -510,7 +481,7 @@ ClangExpressionParser::ClangExpressionParser(
510481
511482 assert (m_compiler->hasTarget ());
512483
513- // 5 . Set language options.
484+ // 4 . Set language options.
514485 lldb::LanguageType language = expr.Language ();
515486 LangOptions &lang_opts = m_compiler->getLangOpts ();
516487
@@ -648,13 +619,13 @@ ClangExpressionParser::ClangExpressionParser(
648619 m_compiler->getTarget ().adjust (m_compiler->getDiagnostics (),
649620 m_compiler->getLangOpts ());
650621
651- // 6 . Set up the diagnostic buffer for reporting errors
622+ // 5 . Set up the diagnostic buffer for reporting errors
652623
653624 auto diag_mgr = new ClangDiagnosticManagerAdapter (
654625 m_compiler->getDiagnostics ().getDiagnosticOptions ());
655626 m_compiler->getDiagnostics ().setClient (diag_mgr);
656627
657- // 7 . Set up the source management objects inside the compiler
628+ // 6 . Set up the source management objects inside the compiler
658629 m_compiler->createFileManager ();
659630 if (!m_compiler->hasSourceManager ())
660631 m_compiler->createSourceManager (m_compiler->getFileManager ());
@@ -689,7 +660,7 @@ ClangExpressionParser::ClangExpressionParser(
689660 }
690661 }
691662
692- // 8 . Most of this we get from the CompilerInstance, but we also want to give
663+ // 7 . Most of this we get from the CompilerInstance, but we also want to give
693664 // the context an ExternalASTSource.
694665
695666 auto &PP = m_compiler->getPreprocessor ();
0 commit comments