[llvm-commits] [llvm] r83100 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Devang Patel dpatel at apple.com
Tue Sep 29 12:56:14 PDT 2009


Author: dpatel
Date: Tue Sep 29 14:56:13 2009
New Revision: 83100

URL: http://llvm.org/viewvc/llvm-project?rev=83100&view=rev
Log:

Remove unnecessary cast.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=83100&r1=83099&r2=83100&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Tue Sep 29 14:56:13 2009
@@ -381,8 +381,7 @@
     if (MDDbgKind) {
       // Update DebugLoc if debug information is attached with this
       // instruction.
-      if (MDNode *Dbg =
-          dyn_cast_or_null<MDNode>(TheMetadata.getMD(MDDbgKind, I))) {
+      if (MDNode *Dbg = TheMetadata.getMD(MDDbgKind, I)) {
         DILocation DILoc(Dbg);
         DebugLoc Loc = ExtractDebugLocation(DILoc, MF->getDebugLocInfo());
         SDL->setCurDebugLoc(Loc);
@@ -743,8 +742,7 @@
         if (MDDbgKind) {
           // Update DebugLoc if debug information is attached with this
           // instruction.
-          if (MDNode *Dbg =
-              dyn_cast_or_null<MDNode>(TheMetadata.getMD(MDDbgKind, BI))) {
+          if (MDNode *Dbg = TheMetadata.getMD(MDDbgKind, BI)) {
             DILocation DILoc(Dbg);
             DebugLoc Loc = ExtractDebugLocation(DILoc,
                                                 MF.getDebugLocInfo());





More information about the llvm-commits mailing list