mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
to match the one specified in LLVM's Mach-O parser. Otherwise LLDB could not possibly find it! This name is used by the swift -modulewrap subcommand, which is currently unused on Darwin, and primarily intended for use under Linux. However, it may be useful to better support static archives (.a) files with Swift debug info in the future. To fully support this, dsymutil and LLDB need to know to look for Swift AST sections in Mach-O objects other than .dSYM bundled. Implementation note: It would be nice to get the section name out of libObject, but with the current architecture this needs a major refactoring that didn't seem justified, given that there is an end-to-end test to prevent such a mishap in the future. <rdar://problem/63991514>
34 lines
1.2 KiB
C++
34 lines
1.2 KiB
C++
//===--- Dwarf.h - DWARF constants ------------------------------*- C++ -*-===//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file defines several temporary Swift-specific DWARF constants.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SWIFT_BASIC_DWARF_H
|
|
#define SWIFT_BASIC_DWARF_H
|
|
|
|
#include "llvm/BinaryFormat/Dwarf.h"
|
|
|
|
namespace swift {
|
|
/// The DWARF version emitted by the Swift compiler.
|
|
const unsigned DWARFVersion = 4;
|
|
|
|
static const char MachOASTSegmentName[] = "__DWARF";
|
|
static const char MachOASTSectionName[] = "__swift_ast";
|
|
static const char ELFASTSectionName[] = ".swift_ast";
|
|
static const char COFFASTSectionName[] = "swiftast";
|
|
static const char WasmASTSectionName[] = ".swift_ast";
|
|
} // end namespace swift
|
|
|
|
#endif // SWIFT_BASIC_DWARF_H
|