NVPTX: Delete dead code
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 3 Dec 2014 04:13:23 +0000 (04:13 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Wed, 3 Dec 2014 04:13:23 +0000 (04:13 +0000)
`MDNode` does not inherit from `User`, and it never has a name.

llvm-svn: 223198

llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp

index 35ba4f1..fe8452e 100644 (file)
@@ -793,11 +793,6 @@ static bool usedInOneFunc(const User *U, Function const *&oneFunc) {
       return false;
   }
 
-  if (const MDNode *md = dyn_cast<MDNode>(U))
-    if (md->hasName() && ((md->getName().str() == "llvm.dbg.gv") ||
-                          (md->getName().str() == "llvm.dbg.sp")))
-      return true;
-
   for (const User *UU : U->users())
     if (usedInOneFunc(UU, oneFunc) == false)
       return false;