mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[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)
This commit is contained in:
parent
6e8de6d572
commit
0216622484
@ -222,7 +222,7 @@ void MachOReader::setSymbolInRelocationInfo(Object &O) const {
|
|||||||
// if we encounter an invalid relocation.
|
// if we encounter an invalid relocation.
|
||||||
assert(SymbolNum >= 1 && SymbolNum <= Sections.size() &&
|
assert(SymbolNum >= 1 && SymbolNum <= Sections.size() &&
|
||||||
"Invalid section index.");
|
"Invalid section index.");
|
||||||
Reloc.Section = Sections[SymbolNum - 1];
|
Reloc.Sec = Sections[SymbolNum - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ void MachOWriter::writeSections() {
|
|||||||
if (!RelocInfo.Scattered) {
|
if (!RelocInfo.Scattered) {
|
||||||
const uint32_t SymbolNum = RelocInfo.Extern
|
const uint32_t SymbolNum = RelocInfo.Extern
|
||||||
? (*RelocInfo.Symbol)->Index
|
? (*RelocInfo.Symbol)->Index
|
||||||
: (*RelocInfo.Section)->Index;
|
: (*RelocInfo.Sec)->Index;
|
||||||
RelocInfo.setPlainRelocationSymbolNum(SymbolNum, IsLittleEndian);
|
RelocInfo.setPlainRelocationSymbolNum(SymbolNum, IsLittleEndian);
|
||||||
}
|
}
|
||||||
if (IsLittleEndian != sys::IsLittleEndianHost)
|
if (IsLittleEndian != sys::IsLittleEndianHost)
|
||||||
|
@ -165,7 +165,7 @@ struct RelocationInfo {
|
|||||||
// The referenced symbol entry. Set if !Scattered && Extern.
|
// The referenced symbol entry. Set if !Scattered && Extern.
|
||||||
Optional<const SymbolEntry *> Symbol;
|
Optional<const SymbolEntry *> Symbol;
|
||||||
// The referenced section. Set if !Scattered && !Extern.
|
// The referenced section. Set if !Scattered && !Extern.
|
||||||
Optional<const Section *> Section;
|
Optional<const Section *> Sec;
|
||||||
// True if Info is a scattered_relocation_info.
|
// True if Info is a scattered_relocation_info.
|
||||||
bool Scattered;
|
bool Scattered;
|
||||||
// True if the r_symbolnum points to a section number (i.e. r_extern=0).
|
// True if the r_symbolnum points to a section number (i.e. r_extern=0).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user