diff options
author | Michael Trent <mtrent@apple.com> | 2017-12-13 00:36:13 +0000 |
---|---|---|
committer | Michael Trent <mtrent@apple.com> | 2017-12-13 00:36:13 +0000 |
commit | 1d3d8adad7d77e92e523fa736fd23ce587ead91d (patch) | |
tree | f69c7bff86322a17deecde2b0f3cf966fd037c3a /llvm/lib/Object/MachOObjectFile.cpp | |
parent | dbcfadedf97afd4e8c61827f5caf214aaef06068 (diff) | |
download | bcm5719-llvm-1d3d8adad7d77e92e523fa736fd23ce587ead91d.tar.gz bcm5719-llvm-1d3d8adad7d77e92e523fa736fd23ce587ead91d.zip |
reverting out -r320532 because a warning is breaking the lld build
llvm-svn: 320534
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
-rw-r--r-- | llvm/lib/Object/MachOObjectFile.cpp | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index aa4015c5f90..4620fdde81d 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -1960,7 +1960,6 @@ MachOObjectFile::section_rel_end(DataRefImpl Sec) const { relocation_iterator MachOObjectFile::extrel_begin() const { DataRefImpl Ret; - // for DYSYMTAB symbols, Ret.d.a == 0 for external relocations Ret.d.a = 0; // Would normally be a section index. Ret.d.b = 0; // Index into the external relocations return relocation_iterator(RelocationRef(Ret, this)); @@ -1969,29 +1968,11 @@ relocation_iterator MachOObjectFile::extrel_begin() const { relocation_iterator MachOObjectFile::extrel_end() const { MachO::dysymtab_command DysymtabLoadCmd = getDysymtabLoadCommand(); DataRefImpl Ret; - // for DYSYMTAB symbols, Ret.d.a == 0 for external relocations Ret.d.a = 0; // Would normally be a section index. Ret.d.b = DysymtabLoadCmd.nextrel; // Index into the external relocations return relocation_iterator(RelocationRef(Ret, this)); } -relocation_iterator MachOObjectFile::locrel_begin() const { - DataRefImpl Ret; - // for DYSYMTAB symbols, Ret.d.a == 1 for local relocations - Ret.d.a = 1; // Would normally be a section index. - Ret.d.b = 0; // Index into the local relocations - return relocation_iterator(RelocationRef(Ret, this)); -} - -relocation_iterator MachOObjectFile::locrel_end() const { - MachO::dysymtab_command DysymtabLoadCmd = getDysymtabLoadCommand(); - DataRefImpl Ret; - // for DYSYMTAB symbols, Ret.d.a == 1 for local relocations - Ret.d.a = 1; // Would normally be a section index. - Ret.d.b = DysymtabLoadCmd.nlocrel; // Index into the local relocations - return relocation_iterator(RelocationRef(Ret, this)); -} - void MachOObjectFile::moveRelocationNext(DataRefImpl &Rel) const { ++Rel.d.b; } @@ -4320,10 +4301,7 @@ MachOObjectFile::getRelocation(DataRefImpl Rel) const { } } else { MachO::dysymtab_command DysymtabLoadCmd = getDysymtabLoadCommand(); - if (Rel.d.a == 0) - Offset = DysymtabLoadCmd.extreloff; // Offset to the external relocations - else - Offset = DysymtabLoadCmd.locreloff; // Offset to the local relocations + Offset = DysymtabLoadCmd.extreloff; // Offset to the external relocations } auto P = reinterpret_cast<const MachO::any_relocation_info *>( |