mirror of
https://github.com/RPCS3/llvm.git
synced 2025-04-09 17:41:10 +00:00
Eliminate tons of bogus warnings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5686 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fb743a937f
commit
dde601d0eb
@ -128,7 +128,8 @@ static bool ResolveFunctions(Module &M, std::vector<GlobalValue*> &Globals,
|
|||||||
const FunctionType *OldMT = Old->getFunctionType();
|
const FunctionType *OldMT = Old->getFunctionType();
|
||||||
const FunctionType *ConcreteMT = Concrete->getFunctionType();
|
const FunctionType *ConcreteMT = Concrete->getFunctionType();
|
||||||
|
|
||||||
if (OldMT->getParamTypes().size() <= ConcreteMT->getParamTypes().size())
|
if (OldMT->getParamTypes().size() < ConcreteMT->getParamTypes().size() &&
|
||||||
|
!ConcreteMT->isVarArg())
|
||||||
if (!Old->use_empty()) {
|
if (!Old->use_empty()) {
|
||||||
std::cerr << "WARNING: Linking function '" << Old->getName()
|
std::cerr << "WARNING: Linking function '" << Old->getName()
|
||||||
<< "' is causing arguments to be dropped.\n";
|
<< "' is causing arguments to be dropped.\n";
|
||||||
@ -145,9 +146,10 @@ static bool ResolveFunctions(Module &M, std::vector<GlobalValue*> &Globals,
|
|||||||
unsigned NumArguments = std::min(OldMT->getParamTypes().size(),
|
unsigned NumArguments = std::min(OldMT->getParamTypes().size(),
|
||||||
ConcreteMT->getParamTypes().size());
|
ConcreteMT->getParamTypes().size());
|
||||||
|
|
||||||
|
if (!Old->use_empty() && !Concrete->use_empty())
|
||||||
for (unsigned i = 0; i < NumArguments; ++i)
|
for (unsigned i = 0; i < NumArguments; ++i)
|
||||||
if (OldMT->getParamTypes()[i] != ConcreteMT->getParamTypes()[i]) {
|
if (OldMT->getParamTypes()[i] != ConcreteMT->getParamTypes()[i]) {
|
||||||
std::cerr << "funcresolve: Function [" << Old->getName()
|
std::cerr << "WARNING: Function [" << Old->getName()
|
||||||
<< "]: Parameter types conflict for: '" << OldMT
|
<< "]: Parameter types conflict for: '" << OldMT
|
||||||
<< "' and '" << ConcreteMT << "'\n";
|
<< "' and '" << ConcreteMT << "'\n";
|
||||||
return Changed;
|
return Changed;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user