IR: Add MDCompileUnit::replace*()
[oota-llvm.git] / include / llvm / IR / DebugInfoMetadata.h
index 57d8bb01b2999fa4728fe252e5999cfe146130aa..a8a39260401e6493d1f1f19d7a8fb7c6b0f6f422 100644 (file)
@@ -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;
   }