mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
[MachOYAML] Use a temporary to avoid gcc strict-aliasing warning
GCC complains about this with -Wstrict-aliasing. Using a temporary here should prevent the warning. llvm-svn: 273627
This commit is contained in:
parent
411e5da487
commit
628114a47f
@ -182,8 +182,10 @@ void mapLoadCommandData<MachO::dylinker_command>(
|
||||
|
||||
void MappingTraits<MachOYAML::LoadCommand>::mapping(
|
||||
IO &IO, MachOYAML::LoadCommand &LoadCommand) {
|
||||
IO.mapRequired(
|
||||
"cmd", (MachO::LoadCommandType &)LoadCommand.Data.load_command_data.cmd);
|
||||
MachO::LoadCommandType TempCmd = static_cast<MachO::LoadCommandType>(
|
||||
LoadCommand.Data.load_command_data.cmd);
|
||||
IO.mapRequired("cmd", TempCmd);
|
||||
LoadCommand.Data.load_command_data.cmd = TempCmd;
|
||||
IO.mapRequired("cmdsize", LoadCommand.Data.load_command_data.cmdsize);
|
||||
|
||||
#define HANDLE_LOAD_COMMAND(LCName, LCValue, LCStruct) \
|
||||
|
Loading…
Reference in New Issue
Block a user