summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCSubtargetInfo.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2015-06-05 13:03:08 +0000
committerEd Maste <emaste@freebsd.org>2015-06-05 13:03:08 +0000
commitf6a1312f1b30a335889f74d92e5ce5e5a6970f4a (patch)
treef9bbf864e03000d59b73a818c765c51ab8b4b59b /llvm/lib/MC/MCSubtargetInfo.cpp
parentacd1cd66c17fed8adeb7108ae8c6ae1f7671bac2 (diff)
downloadbcm5719-llvm-f6a1312f1b30a335889f74d92e5ce5e5a6970f4a.tar.gz
bcm5719-llvm-f6a1312f1b30a335889f74d92e5ce5e5a6970f4a.zip
Improve OSType initialization in elf object file's arch_spec
Setting the OSType in the ArchSpec triple is needed to correctly setup up the register context plugin. ArchSpec::SetArchitecture, for Mach-O only, sets the OSType. For ELF it was left to the ObjectFileELF to fill in the missing OSType. This change moves the ObjectFileELF logic into ArchSpec. A new optional 'os' parameter has been added to SetArchitecture. For ELF, this value is the from the ELF header.e_ident[EI_OSABI]. The default value is 0 or ELFOSABI_NONE. The real work of determining the OSType was done by the ObjectFileELF helper function GetOsFromOSABI. This logic has been moved SetArchitecture. GetOsFromOSABI has been commented as being deprectated. It is left in to support asserts. For ELF the vendor value returned from SetArchitecture should be UnknownVendor. An unneeded resetting in ObjectFileELF has been removed and replaced with an assert. This fixes a problem reading a core file on FreeBSD/ARM because the spec triple was arm-unknown-unknown. Patch by Tom Rix. Differential Revision: http://reviews.llvm.org/D9292 llvm-svn: 239148
Diffstat (limited to 'llvm/lib/MC/MCSubtargetInfo.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud