NFC: Inline unused variable
The variable was not used anywhere except assert and causes build
warnings in the optimized builds.
Clanup after 913bc312b5516f0c7113fe14ea90097587ac5ca5
diff --git a/llvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp b/llvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp
index 4fc0001..256c830 100644
--- a/llvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp
+++ b/llvm/tools/llvm-objcopy/MachO/MachOLayoutBuilder.cpp
@@ -219,12 +219,12 @@
// 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);