Reapply "MC: simplify object file selection for Windows"

That was overly aggressive in assuming that we could always assume COFF.  Some
of the tests assume that they will get ELF rather than COFF even on Windows
where the default is COFF.

llvm-svn: 203176
This commit is contained in:
Saleem Abdulrasool 2014-03-06 23:02:15 +00:00
parent 328a7c4b8b
commit 5715e522ac
1 changed files with 2 additions and 3 deletions

View File

@ -739,9 +739,8 @@ void MCObjectFileInfo::InitMCObjectFileInfo(StringRef TT, Reloc::Model relocm,
(T.isOSDarwin() || T.isOSBinFormatMachO())) {
Env = IsMachO;
InitMachOMCObjectFileInfo(T);
} else if (T.isOSWindows() && !T.isOSBinFormatELF()) {
assert((Arch == Triple::x86 || Arch == Triple::x86_64) &&
"expected x86 or x86_64");
} else if ((Arch == Triple::x86 || Arch == Triple::x86_64) &&
T.getObjectFormat() != Triple::ELF && T.isOSWindows()) {
Env = IsCOFF;
InitCOFFMCObjectFileInfo(T);
} else {