Fix bug: FunctionResolve/2002-11-07-RetMismatch.ll
authorChris Lattner <sabre@nondot.org>
Fri, 8 Nov 2002 00:38:20 +0000 (00:38 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 8 Nov 2002 00:38:20 +0000 (00:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4618 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/FunctionResolution.cpp

index 09d46bedd92b052bec0546cd8c37f290bb2812d3..8ff786ecef2c44bcb6daec83fd2081ab9df34110 100644 (file)
@@ -251,8 +251,7 @@ static bool ProcessGlobalsWithSameName(Module &M,
       // to 'int (int)' or 'int ()' or whatever else is not completely generic.
       //
       Function *F = cast<Function>(Globals[i]);
-      if (!F->getFunctionType()->isVarArg() ||
-          F->getFunctionType()->getNumParams()) {
+      if (!F->isExternal()) {
         if (Concrete)
           return false;   // Found two different functions types.  Can't choose!