91
91
#include " lldb/Utility/StringList.h"
92
92
93
93
#include " Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
94
- #include " Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h"
95
94
96
95
#include < cctype>
97
96
#include < memory>
@@ -396,7 +395,6 @@ ClangExpressionParser::ClangExpressionParser(
396
395
397
396
lldb::LanguageType frame_lang =
398
397
expr.Language (); // defaults to lldb::eLanguageTypeUnknown
399
- bool overridden_target_opts = false ;
400
398
lldb_private::LanguageRuntime *lang_rt = nullptr ;
401
399
402
400
std::string abi;
@@ -464,34 +462,7 @@ ClangExpressionParser::ClangExpressionParser(
464
462
if (!abi.empty ())
465
463
m_compiler->getTargetOpts ().ABI = abi;
466
464
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.
495
466
m_compiler->createDiagnostics ();
496
467
// Limit the number of error diagnostics we emit.
497
468
// A value of 0 means no limit for both LLDB and Clang.
@@ -510,7 +481,7 @@ ClangExpressionParser::ClangExpressionParser(
510
481
511
482
assert (m_compiler->hasTarget ());
512
483
513
- // 5 . Set language options.
484
+ // 4 . Set language options.
514
485
lldb::LanguageType language = expr.Language ();
515
486
LangOptions &lang_opts = m_compiler->getLangOpts ();
516
487
@@ -648,13 +619,13 @@ ClangExpressionParser::ClangExpressionParser(
648
619
m_compiler->getTarget ().adjust (m_compiler->getDiagnostics (),
649
620
m_compiler->getLangOpts ());
650
621
651
- // 6 . Set up the diagnostic buffer for reporting errors
622
+ // 5 . Set up the diagnostic buffer for reporting errors
652
623
653
624
auto diag_mgr = new ClangDiagnosticManagerAdapter (
654
625
m_compiler->getDiagnostics ().getDiagnosticOptions ());
655
626
m_compiler->getDiagnostics ().setClient (diag_mgr);
656
627
657
- // 7 . Set up the source management objects inside the compiler
628
+ // 6 . Set up the source management objects inside the compiler
658
629
m_compiler->createFileManager ();
659
630
if (!m_compiler->hasSourceManager ())
660
631
m_compiler->createSourceManager (m_compiler->getFileManager ());
@@ -689,7 +660,7 @@ ClangExpressionParser::ClangExpressionParser(
689
660
}
690
661
}
691
662
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
693
664
// the context an ExternalASTSource.
694
665
695
666
auto &PP = m_compiler->getPreprocessor ();
0 commit comments