mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-02 02:22:31 +00:00
Allow DIBuilder::replaceVTableHolder() to work with temporary nodes,
tested via the clang test CodeGenCXX/vtable-holder-self-reference.cpp . git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228854 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fe98d69578
commit
4058639603
@ -1229,12 +1229,12 @@ void DIBuilder::replaceVTableHolder(DICompositeType &T, DICompositeType VTableHo
|
||||
if (T != VTableHolder)
|
||||
return;
|
||||
|
||||
// Look for unresolved operands. T has dropped RAUW support and is already
|
||||
// marked resolved, orphaning any cycles underneath it.
|
||||
assert(T->isResolved() && "Expected self-reference to be resolved");
|
||||
for (const MDOperand &O : T->operands())
|
||||
if (auto *N = dyn_cast_or_null<MDNode>(O))
|
||||
trackIfUnresolved(N);
|
||||
// Look for unresolved operands. T will drop RAUW support, orphaning any
|
||||
// cycles underneath it.
|
||||
if (T->isResolved())
|
||||
for (const MDOperand &O : T->operands())
|
||||
if (auto *N = dyn_cast_or_null<MDNode>(O))
|
||||
trackIfUnresolved(N);
|
||||
}
|
||||
|
||||
void DIBuilder::replaceArrays(DICompositeType &T, DIArray Elements,
|
||||
|
Loading…
x
Reference in New Issue
Block a user