aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/Local.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/Utils/Local.cpp')
-rw-r--r--lib/Transforms/Utils/Local.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/Local.cpp b/lib/Transforms/Utils/Local.cpp
index 4be1b8717d..468136c996 100644
--- a/lib/Transforms/Utils/Local.cpp
+++ b/lib/Transforms/Utils/Local.cpp
@@ -262,6 +262,9 @@ bool llvm::OnlyUsedByDbgInfoIntrinsics(Instruction *I,
if (DbgInUses)
DbgInUses->clear();
+ if (I->use_empty())
+ return false;
+
for (Value::use_iterator UI = I->use_begin(), UE = I->use_end(); UI != UE;
++UI) {
if (DbgInfoIntrinsic *DI = dyn_cast<DbgInfoIntrinsic>(*UI)) {