From 7af8cc2893bf648edc9780ebdb8c9025641fe5ad Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Wed, 25 Oct 2023 13:28:07 -0700 Subject: [PATCH] Revert "Remove hardcoded DWARF version and let IRGen derive it from the triple." --- lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp index 190206cff011e..d46c2a937445f 100644 --- a/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp +++ b/lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp @@ -34,6 +34,7 @@ #include "swift/AST/Type.h" #include "swift/AST/Types.h" #include "swift/ASTSectionImporter/ASTSectionImporter.h" +#include "swift/Basic/Dwarf.h" #include "swift/Basic/LLVM.h" #include "swift/Basic/LangOptions.h" #include "swift/Basic/Located.h" @@ -983,6 +984,7 @@ SwiftASTContext::SwiftASTContext(std::string description, m_compiler_invocation_ap->getIRGenOptions(); ir_gen_opts.OutputKind = swift::IRGenOutputKind::Module; ir_gen_opts.UseJIT = true; + ir_gen_opts.DWARFVersion = swift::DWARFVersion; // Allow deserializing @_implementationOnly dependencies // to avoid crashing due to module recovery issues. swift::LangOptions &lang_opts = m_compiler_invocation_ap->getLangOptions();