From 179005f5d6da3fa26c160f1dd42bf90b193404b4 Mon Sep 17 00:00:00 2001 From: Robert Widmann Date: Thu, 8 Sep 2022 22:06:37 -0700 Subject: [PATCH] Resolve a Layering Violation in libBasic --- lldb/source/Core/Module.cpp | 2 +- lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 9141df3df0e6a..8eba63b6043c6 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -1188,7 +1188,7 @@ void Module::ReportWarningToolchainMismatch( llvm::VersionTuple sym_file_version = sym_file->GetProducerVersion(comp_unit); llvm::VersionTuple swift_version = - swift::version::Version::getCurrentCompilerVersion(); + swift::version::getCurrentCompilerVersion(); if (sym_file_version != swift_version) { std::string str = llvm::formatv( "{0} was compiled with a different Swift compiler " diff --git a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.h b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.h index a2f1ee99ded8d..509e48658c060 100644 --- a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.h +++ b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.h @@ -17,6 +17,7 @@ #include "Plugins/TypeSystem/Swift/TypeSystemSwift.h" #include "Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.h" #include "swift/SymbolGraphGen/SymbolGraphOptions.h" +#include "swift/Parse/ParseVersion.h" #include "lldb/Core/SwiftForward.h" #include "lldb/Core/ThreadSafeDenseSet.h" #include "lldb/Utility/Either.h"