[llvm-commits] [llvm] r85518 - /llvm/trunk/lib/Analysis/DebugInfo.cpp

Devang Patel dpatel at apple.com
Thu Oct 29 11:20:34 PDT 2009


Author: dpatel
Date: Thu Oct 29 13:20:34 2009
New Revision: 85518

URL: http://llvm.org/viewvc/llvm-project?rev=85518&view=rev
Log:
First bitcase use may not lead to a dbg.declare intrinsic. Iterate uses until one find's dbg.declare intrinsic.
Patch by Sunae Seo.

Modified:
    llvm/trunk/lib/Analysis/DebugInfo.cpp

Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=85518&r1=85517&r2=85518&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/DebugInfo.cpp Thu Oct 29 13:20:34 2009
@@ -1304,9 +1304,10 @@
       // 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;
     }
 





More information about the llvm-commits mailing list