linux: Set ArchSpec m_type correctly from object file.

An ArchSpec's type defaults to MachO.  Ensure the type is properly set
on ELF systems.

llvm-svn: 125654
This commit is contained in:
Stephen Wilson
2011-02-16 05:25:13 +00:00
parent d879a4d12a
commit de049291fd

View File

@@ -1065,6 +1065,8 @@ ObjectFileELF::GetArchitecture (ArchSpec &arch)
arch.GetTriple().setOSName ("linux");
// TODO: determine if there is an OS in the ELF? Default to "gnu" for now
arch.GetTriple().setVendorName("gnu");
arch.SetElfArch(m_header.e_machine, m_header.e_flags);
return true;
}