diff options
| author | Eric Christopher <echristo@gmail.com> | 2013-07-24 01:51:12 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2013-07-24 01:51:12 +0000 |
| commit | 8d5ecf8c691798f4112f872f437c06a9c3b29c43 (patch) | |
| tree | 782452d1134fe8dded6b474414253a505924d6b4 /llvm | |
| parent | 6fef53dde35891832d6dfd250e4f16d78d71eb9b (diff) | |
| download | bcm5719-llvm-8d5ecf8c691798f4112f872f437c06a9c3b29c43.tar.gz bcm5719-llvm-8d5ecf8c691798f4112f872f437c06a9c3b29c43.zip | |
Replace with a "null" RAUW with an assert since we'd actually like
to assume we're replacing. Clarify comments.
llvm-svn: 187018
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/IR/DebugInfo.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp index f0593450ee1..c7cdb80a6ac 100644 --- a/llvm/lib/IR/DebugInfo.cpp +++ b/llvm/lib/IR/DebugInfo.cpp @@ -327,11 +327,11 @@ unsigned DIArray::getNumElements() const { return DbgNode->getNumOperands(); } -/// replaceAllUsesWith - Replace all uses of debug info referenced by -/// this descriptor. +/// replaceAllUsesWith - Replace all uses of the MDNode used by this +/// type with the one in the passed descriptor. 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 // 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 -/// this descriptor. +/// replaceAllUsesWith - Replace all uses of the MDNode used by this +/// type with the one in 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 // legitimate situations where they want to replaceAllUsesWith() on something |

