uint64_t getOriginalTypeSize() const;
/// dump - print derived type.
void dump() const;
+
+ /// replaceAllUsesWith - Replace all uses of debug info referenced by
+ /// this descriptor. After this completes, the current debug info value
+ /// is erased.
+ void replaceAllUsesWith(DIDescriptor &D);
};
/// DICompositeType - This descriptor holds a type that can refer to multiple
return C->getNumOperands();
}
+/// replaceAllUsesWith - Replace all uses of debug info referenced by
+/// this descriptor. After this completes, the current debug info value
+/// is erased.
+void DIDerivedType::replaceAllUsesWith(DIDescriptor &D) {
+ if (isNull())
+ return;
+
+ assert (D.isNull() && "Can not replace with null");
+ getGV()->replaceAllUsesWith(D.getGV());
+ getGV()->eraseFromParent();
+}
+
/// Verify - Verify that a compile unit is well formed.
bool DICompileUnit::Verify() const {
if (isNull())