Revert "Revert "Make the DWARF version emitted by the Swift compiler configurable.""

This commit is contained in:
Adrian Prantl
2023-10-26 12:29:18 -07:00
committed by GitHub
parent 7afa4cfdc6
commit 5d978b44ca
19 changed files with 104 additions and 69 deletions

View File

@@ -36,7 +36,6 @@
#include "swift/AST/TBDGenRequests.h"
#include "swift/AST/TypeRefinementContext.h"
#include "swift/Basic/Defer.h"
#include "swift/Basic/Dwarf.h"
#include "swift/Basic/Edit.h"
#include "swift/Basic/FileSystem.h"
#include "swift/Basic/LLVMInitialize.h"
@@ -2241,9 +2240,9 @@ int swift::performFrontend(ArrayRef<const char *> Args,
trace.emplace(*buffer);
});
// Setting DWARF Version depend on platform
// Setting DWARF Version based on frontend options.
IRGenOptions &IRGenOpts = Invocation.getIRGenOptions();
IRGenOpts.DWARFVersion = swift::DWARFVersion;
IRGenOpts.DWARFVersion = IRGenOpts.DWARFVersion;
// The compiler invocation is now fully configured; notify our observer.
if (observer) {