diff options
author | Devang Patel <dpatel@apple.com> | 2009-10-29 18:20:34 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-10-29 18:20:34 +0000 |
commit | 78c327f171219dcf214ca21be38c8d24368b9a41 (patch) | |
tree | e406cfce8499ec59fac10de26695af2c71ab662a /llvm/lib/Analysis/DebugInfo.cpp | |
parent | 453d64c9f5d128787ea6bc8ef7493bdd718e799c (diff) | |
download | bcm5719-llvm-78c327f171219dcf214ca21be38c8d24368b9a41.tar.gz bcm5719-llvm-78c327f171219dcf214ca21be38c8d24368b9a41.zip |
First bitcase use may not lead to a dbg.declare intrinsic. Iterate uses until one find's dbg.declare intrinsic.
Patch by Sunae Seo.
llvm-svn: 85518
Diffstat (limited to 'llvm/lib/Analysis/DebugInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/DebugInfo.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp index 1349f2778aa..2a6e04eb743 100644 --- a/llvm/lib/Analysis/DebugInfo.cpp +++ b/llvm/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; } |