mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Debug Info: Reorganized and generalized the layout of the __apple_ast
section based on feedback from Greg. Swift SVN r7443
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#include "llvm/DebugInfo.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/Dwarf.h"
|
||||
#include "llvm/Support/FileSystem.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
@@ -46,30 +45,6 @@ using namespace swift;
|
||||
using namespace irgen;
|
||||
|
||||
|
||||
|
||||
//===--- BEGIN "TO BE FIXED IN A SWIFT BRANCH OF LLVM" ---===//
|
||||
//
|
||||
// DWARF constants.
|
||||
//
|
||||
// The first unused language value in DWARF v5 is DW_LANG_Haskell+1 =
|
||||
// 0x19. We can't use it, because LLVM asserts that there are no
|
||||
// languages >DW_LANG_Python=0x14. Wouldn't it would be much more
|
||||
// appropriate to use a constant in DW_LANG_lo_user..DW_LANG_hi_user
|
||||
// anyway, you may ask? Well, CompileUnit::constructTypeDIE() will
|
||||
// always use a DW_FORM_data1, which is too small for that range! And
|
||||
// by fixing that in LLVM we would hint at developing a new language.
|
||||
// So instead, let's hijack a language with a very low potential for
|
||||
// accidental conflicts for now.
|
||||
static const unsigned DW_LANG_Swift = 0xf;
|
||||
static const unsigned DW_LANG_ObjC = llvm::dwarf::DW_LANG_ObjC; // For symmetry.
|
||||
//
|
||||
// Reuse some existing tag so the verifier doesn't complain.
|
||||
static const unsigned DW_TAG_meta_type = llvm::dwarf::DW_TAG_restrict_type;
|
||||
//
|
||||
//===--------- END "TO BE FIXED IN A SWIFT BRANCH OF LLVM" --------===//
|
||||
|
||||
|
||||
|
||||
/// Strdup a raw char array using the bump pointer.
|
||||
static
|
||||
StringRef BumpAllocatedString(const char* Data, size_t Length,
|
||||
|
||||
Reference in New Issue
Block a user