summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
diff options
context:
space:
mode:
authorOleksiy Vyalov <ovyalov@google.com>2015-04-18 14:08:16 +0000
committerOleksiy Vyalov <ovyalov@google.com>2015-04-18 14:08:16 +0000
commit985c9f0cccbdd4a55c65b0aa525348120583c600 (patch)
treea7cb950f4460cfbd899150be3df778930264cab1 /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
parent4b6aa6eb8efe45474f7eae211c1d64e2eff00e6e (diff)
downloadbcm5719-llvm-985c9f0cccbdd4a55c65b0aa525348120583c600.tar.gz
bcm5719-llvm-985c9f0cccbdd4a55c65b0aa525348120583c600.zip
Remove usages of host architecture within ELF object file for unknown parts of ArchSpec.
http://reviews.llvm.org/D9078 llvm-svn: 235255
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r--lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
index bdfc69c17cd..7e3ec71eb81 100644
--- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -27,7 +27,6 @@
#include "lldb/Symbol/SymbolContext.h"
#include "lldb/Target/SectionLoadList.h"
#include "lldb/Target/Target.h"
-#include "lldb/Host/HostInfo.h"
#include "llvm/ADT/PointerUnion.h"
#include "llvm/ADT/StringRef.h"
@@ -673,14 +672,7 @@ ObjectFileELF::GetModuleSpecifications (const lldb_private::FileSpec& file,
GetSectionHeaderInfo(section_headers, data, header, uuid, gnu_debuglink_file, gnu_debuglink_crc, spec.GetArchitecture ());
- // If the module vendor is not set and the module OS matches this host OS, set the module vendor to the host vendor.
llvm::Triple &spec_triple = spec.GetArchitecture ().GetTriple ();
- if (spec_triple.getVendor () == llvm::Triple::VendorType::UnknownVendor)
- {
- const llvm::Triple &host_triple = HostInfo::GetArchitecture().GetTriple();
- if (spec_triple.getOS () == host_triple.getOS ())
- spec_triple.setVendor (host_triple.getVendor ());
- }
if (log)
log->Printf ("ObjectFileELF::%s file '%s' module set to triple: %s (architecture %s)", __FUNCTION__, file.GetPath ().c_str (), spec_triple.getTriple ().c_str (), spec.GetArchitecture ().GetArchitectureName ());
@@ -1392,30 +1384,6 @@ ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl &section_headers,
{
const uint32_t sub_type = subTypeFromElfHeader(header);
arch_spec.SetArchitecture (eArchTypeELF, header.e_machine, sub_type);
-
- switch (arch_spec.GetAddressByteSize())
- {
- case 4:
- {
- const ArchSpec host_arch32 = HostInfo::GetArchitecture(HostInfo::eArchKind32);
- if (host_arch32.GetCore() == arch_spec.GetCore())
- {
- arch_spec.GetTriple().setOSName(HostInfo::GetOSString().data());
- arch_spec.GetTriple().setVendorName(HostInfo::GetVendorString().data());
- }
- }
- break;
- case 8:
- {
- const ArchSpec host_arch64 = HostInfo::GetArchitecture(HostInfo::eArchKind64);
- if (host_arch64.GetCore() == arch_spec.GetCore())
- {
- arch_spec.GetTriple().setOSName(HostInfo::GetOSString().data());
- arch_spec.GetTriple().setVendorName(HostInfo::GetVendorString().data());
- }
- }
- break;
- }
}
// If there are no section headers we are done.
OpenPOWER on IntegriCloud