]> granicus.if.org Git - llvm/commitdiff
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223198 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/NVPTX/NVPTXAsmPrinter.cpp

index 35ba4f1481defb887a3bc8bcdb893850b78a2b66..fe8452e094e63c0f631146a1c24f223088eec289 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;