[MC] Don't use the architecture to govern which object file format to use
authorDavid Majnemer <david.majnemer@gmail.com>
Tue, 22 Dec 2015 01:39:04 +0000 (01:39 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Tue, 22 Dec 2015 01:39:04 +0000 (01:39 +0000)
commitf31d06a13f671850bb363338bd90625b0f6139bb
treea246736ec4d993a3ef6ee7f47921e620a1521ca7
parentb6b29c7c22966cb0139d8d871cf3fdb8e30d4e10
[MC] Don't use the architecture to govern which object file format to use

InitMCObjectFileInfo was trying to override the triple in awkward ways.
For example, a triple specifying COFF but not Windows was forced as ELF.
This makes it easy for internal invariants to get violated, such as
those which triggered PR25912.

This fixes PR25912.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256226 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCObjectFileInfo.cpp
lib/Support/Triple.cpp
test/CodeGen/X86/statepoint-stackmap-format.ll
test/MC/COFF/ARM/directive-type-diagnostics.s [deleted file]
test/MC/ELF/ARM/directive-type-diagnostics.s [new file with mode: 0644]