Skip to content

Commit 94945f6

Browse files
committed
[NFC][lldb] Health log language options changed in SwiftExpressionParser::GetASTContext
1 parent 846c433 commit 94945f6

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 = [&]() {
@@ -822,15 +826,23 @@ SwiftExpressionParser::GetASTContext(DiagnosticManager &diagnostic_manager) {
822826
};
823827
if (should_disable_objc_runtime())
824828
m_swift_ast_ctx.GetLanguageOptions().EnableObjCInterop = false;
829+
LLDB_LOG(lldb_private::GetSwiftHealthLog(), "Language option EnableObjCInterop = {0}",
830+
m_swift_ast_ctx.GetLanguageOptions().EnableObjCInterop);
825831

826832
m_swift_ast_ctx.GetLanguageOptions().Playground = repl || playground;
833+
LLDB_LOG(lldb_private::GetSwiftHealthLog(), "Language option Playground = {0}",
834+
m_swift_ast_ctx.GetLanguageOptions().Playground);
835+
827836
m_swift_ast_ctx.GetIRGenOptions().Playground = repl || playground;
828837

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

835847
m_swift_ast_ctx.GetIRGenOptions().OutputKind =
836848
swift::IRGenOutputKind::Module;

0 commit comments

Comments
 (0)