mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-16 11:24:39 +00:00
Debug Info: Add basic support for external types references.
This is a necessary prerequisite for bootstrapping the emission of debug info inside modules. - Adds a FlagExternalTypeRef to DICompositeType. External types must have a unique identifier. - External type references are emitted using a forward declaration with a DW_AT_signature([DW_FORM_ref_sig8]) based on the UID. http://reviews.llvm.org/D9612 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242302 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -435,6 +435,18 @@ DISubroutineType *DIBuilder::createSubroutineType(DIFile *File,
|
||||
return DISubroutineType::get(VMContext, Flags, ParameterTypes);
|
||||
}
|
||||
|
||||
DICompositeType *DIBuilder::createExternalTypeRef(unsigned Tag, DIFile *File,
|
||||
StringRef UniqueIdentifier) {
|
||||
assert(!UniqueIdentifier.empty() && "external type ref without uid");
|
||||
auto *CTy =
|
||||
DICompositeType::get(VMContext, Tag, "", nullptr, 0, nullptr, nullptr, 0,
|
||||
0, 0, DINode::FlagExternalTypeRef, nullptr, 0,
|
||||
nullptr, nullptr, UniqueIdentifier);
|
||||
// Types with unique IDs need to be in the type map.
|
||||
retainType(CTy);
|
||||
return CTy;
|
||||
}
|
||||
|
||||
DICompositeType *DIBuilder::createEnumerationType(
|
||||
DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
|
||||
uint64_t SizeInBits, uint64_t AlignInBits, DINodeArray Elements,
|
||||
|
Reference in New Issue
Block a user