mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-24 08:24:33 +00:00
Move an assert earlier in a file and check that the result of
our bitwise compare is equal to the field we're looking for. Noticed on inspection. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176296 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -1304,14 +1304,17 @@ StringRef MachOObjectFile::getFileFormatName() const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make sure the cpu type has the correct mask.
|
||||||
|
assert((MachOObj->getHeader().CPUType & llvm::MachO::CPUArchABI64)
|
||||||
|
== llvm::MachO::CPUArchABI64 &&
|
||||||
|
"32-bit object file when we're 64-bit?");
|
||||||
|
|
||||||
switch (MachOObj->getHeader().CPUType) {
|
switch (MachOObj->getHeader().CPUType) {
|
||||||
case llvm::MachO::CPUTypeX86_64:
|
case llvm::MachO::CPUTypeX86_64:
|
||||||
return "Mach-O 64-bit x86-64";
|
return "Mach-O 64-bit x86-64";
|
||||||
case llvm::MachO::CPUTypePowerPC64:
|
case llvm::MachO::CPUTypePowerPC64:
|
||||||
return "Mach-O 64-bit ppc64";
|
return "Mach-O 64-bit ppc64";
|
||||||
default:
|
default:
|
||||||
assert((MachOObj->getHeader().CPUType & llvm::MachO::CPUArchABI64) == 1 &&
|
|
||||||
"32-bit object file when we're 64-bit?");
|
|
||||||
return "Mach-O 64-bit unknown";
|
return "Mach-O 64-bit unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user