mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-11 22:29:37 +00:00
Replace with a "null" RAUW with an assert since we'd actually like
to assume we're replacing. Clarify comments. llvm-svn: 187018
This commit is contained in:
parent
9129fda4c9
commit
bd6870b6ce
@ -327,11 +327,11 @@ unsigned DIArray::getNumElements() const {
|
|||||||
return DbgNode->getNumOperands();
|
return DbgNode->getNumOperands();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// replaceAllUsesWith - Replace all uses of debug info referenced by
|
/// replaceAllUsesWith - Replace all uses of the MDNode used by this
|
||||||
/// this descriptor.
|
/// type with the one in the passed descriptor.
|
||||||
void DIType::replaceAllUsesWith(DIDescriptor &D) {
|
void DIType::replaceAllUsesWith(DIDescriptor &D) {
|
||||||
if (!DbgNode)
|
|
||||||
return;
|
assert(DbgNode && "Trying to replace an unverified type!");
|
||||||
|
|
||||||
// Since we use a TrackingVH for the node, its easy for clients to manufacture
|
// Since we use a TrackingVH for the node, its easy for clients to manufacture
|
||||||
// legitimate situations where they want to replaceAllUsesWith() on something
|
// legitimate situations where they want to replaceAllUsesWith() on something
|
||||||
@ -347,11 +347,11 @@ void DIType::replaceAllUsesWith(DIDescriptor &D) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// replaceAllUsesWith - Replace all uses of debug info referenced by
|
/// replaceAllUsesWith - Replace all uses of the MDNode used by this
|
||||||
/// this descriptor.
|
/// type with the one in D.
|
||||||
void DIType::replaceAllUsesWith(MDNode *D) {
|
void DIType::replaceAllUsesWith(MDNode *D) {
|
||||||
if (!DbgNode)
|
|
||||||
return;
|
assert(DbgNode && "Trying to replace an unverified type!");
|
||||||
|
|
||||||
// Since we use a TrackingVH for the node, its easy for clients to manufacture
|
// Since we use a TrackingVH for the node, its easy for clients to manufacture
|
||||||
// legitimate situations where they want to replaceAllUsesWith() on something
|
// legitimate situations where they want to replaceAllUsesWith() on something
|
||||||
|
Loading…
x
Reference in New Issue
Block a user