Clean up warning about unused variable
authorMichael Ilseman <milseman@apple.com>
Mon, 15 Dec 2014 21:47:09 +0000 (21:47 +0000)
committerMichael Ilseman <milseman@apple.com>
Mon, 15 Dec 2014 21:47:09 +0000 (21:47 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224281 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Linker/LinkModules.cpp

index 9c3f18348010127d4a1629b8e56d2a79b1265720..d6f4ef81d743872816bb3bd975a63c68344d60cf 100644 (file)
@@ -1532,8 +1532,10 @@ bool ModuleLinker::run() {
     GlobalValue *SGV = LazilyLinkGlobalValues.back();
     LazilyLinkGlobalValues.pop_back();
 
-    if (auto F = dyn_cast<Function>(SGV))
-      assert(!F->isDeclaration() && "users should not pass down decls");
+    if (isa<Function>(SGV))
+      assert(!cast<Function>(SGV)->isDeclaration() &&
+             "users should not pass down decls");
+
     if (linkGlobalValueBody(*SGV))
       return true;
   }