Skip to content

Commit 3c0b016

Browse files
Merge pull request #9833 from augusto2112/health-log-lang-opts
[NFC][lldb] Health log language options changed in SwiftExpressionPar…
2 parents 3cedd74 + 94945f6 commit 3c0b016

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

lldb/source/Plugins/ExpressionParser/Swift/SwiftExpressionParser.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include "SwiftExpressionParser.h"
1414

15+
#include "Plugins/Language/Swift/LogChannelSwift.h"
1516
#include "SwiftASTManipulator.h"
1617
#include "SwiftDiagnostic.h"
1718
#include "SwiftExpressionSourceCode.h"
@@ -809,6 +810,9 @@ SwiftExpressionParser::GetASTContext(DiagnosticManager &diagnostic_manager) {
809810
m_swift_ast_ctx.GetLanguageOptions().EnableDollarIdentifiers = true;
810811
m_swift_ast_ctx.GetLanguageOptions().EnableAccessControl =
811812
(repl || playground);
813+
LLDB_LOG(lldb_private::GetSwiftHealthLog(), "Language option EnableAccessControl = {0}",
814+
m_swift_ast_ctx.GetLanguageOptions().EnableAccessControl);
815+
812816
m_swift_ast_ctx.GetLanguageOptions().EnableTargetOSChecking = false;
813817

814818
auto should_disable_objc_runtime = [&]() {
@@ -824,15 +828,23 @@ SwiftExpressionParser::GetASTContext(DiagnosticManager &diagnostic_manager) {
824828
};
825829
if (should_disable_objc_runtime())
826830
m_swift_ast_ctx.GetLanguageOptions().EnableObjCInterop = false;
831+
LLDB_LOG(lldb_private::GetSwiftHealthLog(), "Language option EnableObjCInterop = {0}",
832+
m_swift_ast_ctx.GetLanguageOptions().EnableObjCInterop);
827833

828834
m_swift_ast_ctx.GetLanguageOptions().Playground = repl || playground;
835+
LLDB_LOG(lldb_private::GetSwiftHealthLog(), "Language option Playground = {0}",
836+
m_swift_ast_ctx.GetLanguageOptions().Playground);
837+
829838
m_swift_ast_ctx.GetIRGenOptions().Playground = repl || playground;
830839

831840
// For the expression parser and REPL we want to relax the
832841
// requirement that you put "try" in front of every expression that
833842
// might throw.
834843
if (repl || !playground)
835844
m_swift_ast_ctx.GetLanguageOptions().EnableThrowWithoutTry = true;
845+
LLDB_LOG(lldb_private::GetSwiftHealthLog(), "Language option EnableThrowWithoutTry = {0}",
846+
m_swift_ast_ctx.GetLanguageOptions().EnableThrowWithoutTry);
847+
836848

837849
m_swift_ast_ctx.GetIRGenOptions().OutputKind =
838850
swift::IRGenOutputKind::Module;

0 commit comments

Comments
 (0)