mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
FunctionComparator: don't rely on argument evaluation order.
This is a follow-up on the recent refactoring of the FunctionMerge pass. It should fix a fail of the new FunctionComparator unittest whe compiling with MSVC. llvm-svn: 286648
This commit is contained in:
parent
cea82ea37d
commit
e69fd0701d
@ -355,7 +355,9 @@ int FunctionComparator::cmpConstants(const Constant *L,
|
|||||||
}
|
}
|
||||||
|
|
||||||
int FunctionComparator::cmpGlobalValues(GlobalValue *L, GlobalValue *R) const {
|
int FunctionComparator::cmpGlobalValues(GlobalValue *L, GlobalValue *R) const {
|
||||||
return cmpNumbers(GlobalNumbers->getNumber(L), GlobalNumbers->getNumber(R));
|
uint64_t LNumber = GlobalNumbers->getNumber(L);
|
||||||
|
uint64_t RNumber = GlobalNumbers->getNumber(R);
|
||||||
|
return cmpNumbers(LNumber, RNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// cmpType - compares two types,
|
/// cmpType - compares two types,
|
||||||
|
Loading…
Reference in New Issue
Block a user