mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
[llvm-objcopy] Fix "unused-function" warning in NDEBUG builds
Fixup of commit b925ca37a8f28851 to allow building with -Werror -Wunused-function.
This commit is contained in:
parent
9d2475cbc2
commit
79f2047cca
@ -22,6 +22,7 @@ using namespace object;
|
||||
using SectionPred = std::function<bool(const std::unique_ptr<Section> &Sec)>;
|
||||
using LoadCommandPred = std::function<bool(const LoadCommand &LC)>;
|
||||
|
||||
#ifndef NDEBUG
|
||||
static bool isLoadCommandWithPayloadString(const LoadCommand &LC) {
|
||||
// TODO: Add support for LC_REEXPORT_DYLIB, LC_LOAD_UPWARD_DYLIB and
|
||||
// LC_LAZY_LOAD_DYLIB
|
||||
@ -30,6 +31,7 @@ static bool isLoadCommandWithPayloadString(const LoadCommand &LC) {
|
||||
LC.MachOLoadCommand.load_command_data.cmd == MachO::LC_LOAD_DYLIB ||
|
||||
LC.MachOLoadCommand.load_command_data.cmd == MachO::LC_LOAD_WEAK_DYLIB;
|
||||
}
|
||||
#endif
|
||||
|
||||
static StringRef getPayloadString(const LoadCommand &LC) {
|
||||
assert(isLoadCommandWithPayloadString(LC) &&
|
||||
|
Loading…
Reference in New Issue
Block a user