mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
NFC: Inline unused variable
The variable was not used anywhere except assert and causes build warnings in the optimized builds. Clanup after 913bc312b5516f0c7113fe14ea90097587ac5ca5
This commit is contained in:
parent
c4908bd9d4
commit
33517a77c3
@ -219,12 +219,12 @@ Error MachOLayoutBuilder::layoutTail(uint64_t Offset) {
|
||||
// If we are building the layout of an executable or dynamic library
|
||||
// which does not have any segments other than __LINKEDIT,
|
||||
// the Offset can be equal to zero by this time. It happens because of the
|
||||
// convention that in such cases the file offsets specified by LC_SEGMENT start
|
||||
// with zero (unlike the case of a relocatable object file).
|
||||
const bool IsObject = O.Header.FileType == MachO::HeaderFileType::MH_OBJECT;
|
||||
// convention that in such cases the file offsets specified by LC_SEGMENT
|
||||
// start with zero (unlike the case of a relocatable object file).
|
||||
const uint64_t HeaderSize =
|
||||
Is64Bit ? sizeof(MachO::mach_header_64) : sizeof(MachO::mach_header);
|
||||
assert((!IsObject || Offset >= HeaderSize + O.Header.SizeOfCmds) &&
|
||||
assert((!(O.Header.FileType == MachO::HeaderFileType::MH_OBJECT) ||
|
||||
Offset >= HeaderSize + O.Header.SizeOfCmds) &&
|
||||
"Incorrect tail offset");
|
||||
Offset = std::max(Offset, HeaderSize + O.Header.SizeOfCmds);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user