[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)
commitff1d084aa2f07927f3c63c93f3286822abe9d1ac
tree5ff2fae7c2a9b59f37829e17a4eac861b1728856
parenta9f3bc6d86a7e067a4529895ae3e76f0c587c128
[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.

llvm-svn: 256226
llvm/lib/MC/MCObjectFileInfo.cpp
llvm/lib/Support/Triple.cpp
llvm/test/CodeGen/X86/statepoint-stackmap-format.ll
llvm/test/MC/COFF/ARM/directive-type-diagnostics.s [deleted file]
llvm/test/MC/ELF/ARM/directive-type-diagnostics.s [new file with mode: 0644]