Make the assert a bit stronger.
[oota-llvm.git] / lib / Linker / LinkModules.cpp
index cba6f1a31816f78f6d48dd065bbdea199e518eaa..0e144157af4d8b68bfd50dce801fc5d0e6e0eb85 100644 (file)
@@ -1532,8 +1532,7 @@ bool ModuleLinker::run() {
     GlobalValue *SGV = LazilyLinkGlobalValues.back();
     LazilyLinkGlobalValues.pop_back();
 
-    assert((!isa<Function>(SGV) || !cast<Function>(SGV)->isDeclaration()) &&
-           "users should not pass down decls");
+    assert(!SGV->isDeclaration() && "users should not pass down decls");
     if (linkGlobalValueBody(*SGV))
       return true;
   }