mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-02 22:23:10 +00:00
IR: Add MDCompileUnit::replace*()
Add `MDCompileUnit::replaceGlobalVariables()` and `MDCompileUnit::replaceSubprograms()`. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229743 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -850,6 +850,16 @@ public:
|
||||
return getOperandAs<MDString>(3);
|
||||
}
|
||||
|
||||
/// \brief Replace arrays.
|
||||
///
|
||||
/// If this \a isUniqued() and not \a isResolved(), it will be RAUW'ed and
|
||||
/// deleted on a uniquing collision. In practice, uniquing collisions on \a
|
||||
/// MDCompileUnit should be fairly rare.
|
||||
/// @{
|
||||
void replaceSubprograms(MDTuple *N) { replaceOperandWith(6, N); }
|
||||
void replaceGlobalVariables(MDTuple *N) { replaceOperandWith(7, N); }
|
||||
/// @}
|
||||
|
||||
static bool classof(const Metadata *MD) {
|
||||
return MD->getMetadataID() == MDCompileUnitKind;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user