mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Add support to create class type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -288,6 +288,26 @@ void DIType::replaceAllUsesWith(DIDescriptor &D) {
|
||||
}
|
||||
}
|
||||
|
||||
/// replaceAllUsesWith - Replace all uses of debug info referenced by
|
||||
/// this descriptor.
|
||||
void DIType::replaceAllUsesWith(MDNode *D) {
|
||||
if (!DbgNode)
|
||||
return;
|
||||
|
||||
// Since we use a TrackingVH for the node, its easy for clients to manufacture
|
||||
// legitimate situations where they want to replaceAllUsesWith() on something
|
||||
// which, due to uniquing, has merged with the source. We shield clients from
|
||||
// this detail by allowing a value to be replaced with replaceAllUsesWith()
|
||||
// itself.
|
||||
if (DbgNode != D) {
|
||||
MDNode *Node = const_cast<MDNode*>(DbgNode);
|
||||
const MDNode *DN = D;
|
||||
const Value *V = cast_or_null<Value>(DN);
|
||||
Node->replaceAllUsesWith(const_cast<Value*>(V));
|
||||
MDNode::deleteTemporary(Node);
|
||||
}
|
||||
}
|
||||
|
||||
/// Verify - Verify that a compile unit is well formed.
|
||||
bool DICompileUnit::Verify() const {
|
||||
if (!DbgNode)
|
||||
|
Reference in New Issue
Block a user