Skip to content

Commit c44c3e9

Browse files
committed
Add a setting for precise compiler invocations.
1 parent 541f571 commit c44c3e9

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

lldb/include/lldb/Core/ModuleList.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ class ModuleListProperties : public Properties {
6666
SwiftModuleLoadingMode GetSwiftModuleLoadingMode() const;
6767
bool SetSwiftModuleLoadingMode(SwiftModuleLoadingMode);
6868

69+
bool GetUseSwiftPreciseCompilerInvocation() const;
6970
bool GetEnableSwiftMetadataCache() const;
7071
uint64_t GetSwiftMetadataCacheMaxByteSize();
7172
uint64_t GetSwiftMetadataCacheExpirationDays();

lldb/source/Core/CoreProperties.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ let Definition = "modulelist" in {
2626
def SwiftValidateTypeSystem: Property<"swift-validate-typesystem", "Boolean">,
2727
DefaultFalse,
2828
Desc<"Validate all Swift typesystem queries. Used for testing an asserts-enabled LLDB only.">;
29+
def UseSwiftPreciseCompilerInvocation: Property<"swift-precise-compiler-invocation", "Boolean">,
30+
DefaultFalse,
31+
Desc<"In the Swift expression evaluator, create many Swift compiler instances with the precise invocation for the current context, instead of a single compiler instance that merges all flags from the entire project.">;
2932
def SwiftModuleLoadingMode: Property<"swift-module-loading-mode", "Enum">,
3033
DefaultEnumValue<"eSwiftModuleLoadingModePreferSerialized">,
3134
EnumValues<"OptionEnumValues(g_swift_module_loading_mode_enums)">,

lldb/source/Core/ModuleList.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ bool ModuleListProperties::GetSwiftValidateTypeSystem() const {
183183
idx, g_modulelist_properties[idx].default_uint_value != 0);
184184
}
185185

186+
bool ModuleListProperties::GetUseSwiftPreciseCompilerInvocation() const {
187+
const uint32_t idx = ePropertyUseSwiftPreciseCompilerInvocation;
188+
return GetPropertyAtIndexAs<bool>(
189+
idx, g_modulelist_properties[idx].default_uint_value != 0);
190+
}
191+
186192
bool ModuleListProperties::SetUseSwiftTypeRefTypeSystem(bool new_value) {
187193
const uint32_t idx = ePropertyUseSwiftTypeRefTypeSystem;
188194
return SetPropertyAtIndex(idx, new_value);

0 commit comments

Comments
 (0)