commit | 29c6f5c7fdd981ebf03f7f61ab4c328fad7555dc | [log] [tgz] |
---|---|---|
author | Alexander Shaposhnikov <alexshap@fb.com> | Mon Apr 27 18:20:01 2020 -0700 |
committer | Alexander Shaposhnikov <alexshap@fb.com> | Mon Apr 27 18:20:01 2020 -0700 |
tree | a59037d5a273661be679a3712c7539086d0b6747 | |
parent | 0db3a5a93e113d681e78ea5f7dd8cd1020d02a7b [diff] [blame] |
[llvm-objcopy][MachO] Fix build Some compilers are confused when the same name is used in different contexts. Rename the field Section to unbreak the build. (Caught by the buildbot http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/22374)
diff --git a/llvm/tools/llvm-objcopy/MachO/MachOWriter.cpp b/llvm/tools/llvm-objcopy/MachO/MachOWriter.cpp index 4a8d1ae..1cb67d0 100644 --- a/llvm/tools/llvm-objcopy/MachO/MachOWriter.cpp +++ b/llvm/tools/llvm-objcopy/MachO/MachOWriter.cpp
@@ -243,7 +243,7 @@ if (!RelocInfo.Scattered) { const uint32_t SymbolNum = RelocInfo.Extern ? (*RelocInfo.Symbol)->Index - : (*RelocInfo.Section)->Index; + : (*RelocInfo.Sec)->Index; RelocInfo.setPlainRelocationSymbolNum(SymbolNum, IsLittleEndian); } if (IsLittleEndian != sys::IsLittleEndianHost)