mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
IR: Add MDSubprogram::replaceFunction()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229742 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -968,6 +968,17 @@ public:
|
||||
Metadata *getDeclaration() const { return getOperand(9); }
|
||||
Metadata *getVariables() const { return getOperand(10); }
|
||||
|
||||
/// \brief Replace the function.
|
||||
///
|
||||
/// If \a isUniqued() and not \a isResolved(), this could node will be
|
||||
/// RAUW'ed and deleted out from under the caller. Use a \a TrackingMDRef if
|
||||
/// that's a problem.
|
||||
/// @{
|
||||
void replaceFunction(Function *F);
|
||||
void replaceFunction(ConstantAsMetadata *MD) { replaceOperandWith(7, MD); }
|
||||
void replaceFunction(std::nullptr_t) { replaceOperandWith(7, nullptr); }
|
||||
/// @}
|
||||
|
||||
static bool classof(const Metadata *MD) {
|
||||
return MD->getMetadataID() == MDSubprogramKind;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user