aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DebugInfo.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-10-29 18:20:34 +0000
committerDevang Patel <dpatel@apple.com>2009-10-29 18:20:34 +0000
commit94dfaec32cd384d723970d0f0e6578a1f99eee38 (patch)
treea82edcc4b1d1dd5759a923a9eae18c7aa12b1c39 /lib/Analysis/DebugInfo.cpp
parent533297b58da8c74bec65551e1aface9801fc2259 (diff)
First bitcase use may not lead to a dbg.declare intrinsic. Iterate uses until one find's dbg.declare intrinsic.
Patch by Sunae Seo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DebugInfo.cpp')
-rw-r--r--lib/Analysis/DebugInfo.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Analysis/DebugInfo.cpp b/lib/Analysis/DebugInfo.cpp
index 1349f2778a..2a6e04eb74 100644
--- a/lib/Analysis/DebugInfo.cpp
+++ b/lib/Analysis/DebugInfo.cpp
@@ -1304,9 +1304,10 @@ namespace llvm {
// Look for the bitcast.
for (Value::use_const_iterator I = V->use_begin(), E =V->use_end();
I != E; ++I)
- if (isa<BitCastInst>(I))
- return findDbgDeclare(*I, false);
-
+ if (isa<BitCastInst>(I)) {
+ const DbgDeclareInst *DDI = findDbgDeclare(*I, false);
+ if (DDI) return DDI;
+ }
return 0;
}