summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-11 19:29:09 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-11 19:29:09 +0000
commit127ea4b616b1436739225607da5d90c25a8bb0b5 (patch)
tree225c0be66b7f245649d2e4ad8da05f86d7566a19 /llvm/lib
parent497d4d465bf441e95ec2e09febd7ea23ec4957c7 (diff)
downloadbcm5719-llvm-127ea4b616b1436739225607da5d90c25a8bb0b5.tar.gz
bcm5719-llvm-127ea4b616b1436739225607da5d90c25a8bb0b5.zip
DebugInfo: Remove dead DIDescriptor::replaceAllUsesWith()
r234696 replaced the only use of `DIDescriptor::replaceAllUsesWith()` with `DIBuilder::replaceTemporary()` (added in r234695). Delete the dead code. llvm-svn: 234697
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index c8ae2639161..1fbc53c195b 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -50,33 +50,6 @@ unsigned DIVariable::getSizeInBits(const DITypeIdentifierMap &Map) {
// Simple Descriptor Constructors and other Methods
//===----------------------------------------------------------------------===//
-void DIDescriptor::replaceAllUsesWith(LLVMContext &, DIDescriptor D) {
- assert(DbgNode && "Trying to replace an unverified type!");
- assert(DbgNode->isTemporary() && "Expected temporary node");
- TempMDNode Temp(get());
-
- // 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 (Temp.get() == D.get()) {
- DbgNode = MDNode::replaceWithUniqued(std::move(Temp));
- return;
- }
-
- Temp->replaceAllUsesWith(D.get());
- DbgNode = D.get();
-}
-
-void DIDescriptor::replaceAllUsesWith(MDNode *D) {
- assert(DbgNode && "Trying to replace an unverified type!");
- assert(DbgNode != D && "This replacement should always happen");
- assert(DbgNode->isTemporary() && "Expected temporary node");
- TempMDNode Node(get());
- Node->replaceAllUsesWith(D);
-}
-
DIScopeRef DIScope::getRef() const { return MDScopeRef::get(get()); }
bool DIVariable::isInlinedFnArgument(const Function *CurFn) {
OpenPOWER on IntegriCloud