mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-15 19:24:33 +00:00
Provide basic type safety for array_pod_sort comparators.
This makes using array_pod_sort significantly safer. The implementation relies on function pointer casting but that should be safe as we're dealing with void* here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191175 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -813,9 +813,10 @@ static bool testSubClass(const CodeGenRegisterClass *A,
|
||||
/// Register classes with the same registers, spill size, and alignment form a
|
||||
/// clique. They will be ordered alphabetically.
|
||||
///
|
||||
static int TopoOrderRC(const void *PA, const void *PB) {
|
||||
const CodeGenRegisterClass *A = *(const CodeGenRegisterClass* const*)PA;
|
||||
const CodeGenRegisterClass *B = *(const CodeGenRegisterClass* const*)PB;
|
||||
static int TopoOrderRC(CodeGenRegisterClass *const *PA,
|
||||
CodeGenRegisterClass *const *PB) {
|
||||
const CodeGenRegisterClass *A = *PA;
|
||||
const CodeGenRegisterClass *B = *PB;
|
||||
if (A == B)
|
||||
return 0;
|
||||
|
||||
|
Reference in New Issue
Block a user