diff --git a/llvm/lib/Transforms/IPO/FunctionResolution.cpp b/llvm/lib/Transforms/IPO/FunctionResolution.cpp index 09d46bedd92b..8ff786ecef2c 100644 --- a/llvm/lib/Transforms/IPO/FunctionResolution.cpp +++ b/llvm/lib/Transforms/IPO/FunctionResolution.cpp @@ -251,8 +251,7 @@ static bool ProcessGlobalsWithSameName(Module &M, // to 'int (int)' or 'int ()' or whatever else is not completely generic. // Function *F = cast(Globals[i]); - if (!F->getFunctionType()->isVarArg() || - F->getFunctionType()->getNumParams()) { + if (!F->isExternal()) { if (Concrete) return false; // Found two different functions types. Can't choose!