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:
Adrian Prantl
2015-02-11 17:45:05 +00:00
parent 28f550eed1
commit 71a70be163
2 changed files with 6 additions and 5 deletions

View File

@ -816,10 +816,10 @@ DIBuilder::createForwardDecl(unsigned Tag, StringRef Name, DIDescriptor Scope,
return RetTy;
}
DICompositeType DIBuilder::createReplaceableForwardDecl(
DICompositeType DIBuilder::createReplaceableCompositeType(
unsigned Tag, StringRef Name, DIDescriptor Scope, DIFile F, unsigned Line,
unsigned RuntimeLang, uint64_t SizeInBits, uint64_t AlignInBits,
StringRef UniqueIdentifier) {
unsigned Flags, StringRef UniqueIdentifier) {
// Create a temporary MDNode.
Metadata *Elts[] = {
HeaderBuilder::get(Tag)
@ -828,7 +828,7 @@ DICompositeType DIBuilder::createReplaceableForwardDecl(
.concat(SizeInBits)
.concat(AlignInBits)
.concat(0) // Offset
.concat(DIDescriptor::FlagFwdDecl)
.concat(Flags)
.concat(RuntimeLang)
.get(VMContext),
F.getFileNode(), DIScope(getNonCompileUnitScope(Scope)).getRef(), nullptr,