mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Generalize DIBuilder's createReplaceableForwardDecl() to a more flexible
createReplaceableCompositeType() that allows to create non-forward-declared temporary nodes. Paired commit with CFE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228852 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -440,10 +440,11 @@ namespace llvm {
|
|||||||
StringRef UniqueIdentifier = StringRef());
|
StringRef UniqueIdentifier = StringRef());
|
||||||
|
|
||||||
/// \brief Create a temporary forward-declared type.
|
/// \brief Create a temporary forward-declared type.
|
||||||
DICompositeType createReplaceableForwardDecl(
|
DICompositeType createReplaceableCompositeType(
|
||||||
unsigned Tag, StringRef Name, DIDescriptor Scope, DIFile F,
|
unsigned Tag, StringRef Name, DIDescriptor Scope, DIFile F,
|
||||||
unsigned Line, unsigned RuntimeLang = 0, uint64_t SizeInBits = 0,
|
unsigned Line, unsigned RuntimeLang = 0, uint64_t SizeInBits = 0,
|
||||||
uint64_t AlignInBits = 0, StringRef UniqueIdentifier = StringRef());
|
uint64_t AlignInBits = 0, unsigned Flags = DIDescriptor::FlagFwdDecl,
|
||||||
|
StringRef UniqueIdentifier = StringRef());
|
||||||
|
|
||||||
/// retainType - Retain DIType in a module even if it is not referenced
|
/// retainType - Retain DIType in a module even if it is not referenced
|
||||||
/// through debug info anchors.
|
/// through debug info anchors.
|
||||||
|
@ -816,10 +816,10 @@ DIBuilder::createForwardDecl(unsigned Tag, StringRef Name, DIDescriptor Scope,
|
|||||||
return RetTy;
|
return RetTy;
|
||||||
}
|
}
|
||||||
|
|
||||||
DICompositeType DIBuilder::createReplaceableForwardDecl(
|
DICompositeType DIBuilder::createReplaceableCompositeType(
|
||||||
unsigned Tag, StringRef Name, DIDescriptor Scope, DIFile F, unsigned Line,
|
unsigned Tag, StringRef Name, DIDescriptor Scope, DIFile F, unsigned Line,
|
||||||
unsigned RuntimeLang, uint64_t SizeInBits, uint64_t AlignInBits,
|
unsigned RuntimeLang, uint64_t SizeInBits, uint64_t AlignInBits,
|
||||||
StringRef UniqueIdentifier) {
|
unsigned Flags, StringRef UniqueIdentifier) {
|
||||||
// Create a temporary MDNode.
|
// Create a temporary MDNode.
|
||||||
Metadata *Elts[] = {
|
Metadata *Elts[] = {
|
||||||
HeaderBuilder::get(Tag)
|
HeaderBuilder::get(Tag)
|
||||||
@ -828,7 +828,7 @@ DICompositeType DIBuilder::createReplaceableForwardDecl(
|
|||||||
.concat(SizeInBits)
|
.concat(SizeInBits)
|
||||||
.concat(AlignInBits)
|
.concat(AlignInBits)
|
||||||
.concat(0) // Offset
|
.concat(0) // Offset
|
||||||
.concat(DIDescriptor::FlagFwdDecl)
|
.concat(Flags)
|
||||||
.concat(RuntimeLang)
|
.concat(RuntimeLang)
|
||||||
.get(VMContext),
|
.get(VMContext),
|
||||||
F.getFileNode(), DIScope(getNonCompileUnitScope(Scope)).getRef(), nullptr,
|
F.getFileNode(), DIScope(getNonCompileUnitScope(Scope)).getRef(), nullptr,
|
||||||
|
Reference in New Issue
Block a user