diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-03-06 20:47:03 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-03-06 20:47:03 +0000 |
commit | 0b5569972f4dae062a430fa0e8cedc0021b020b8 (patch) | |
tree | f27ca124c1051cd5980f25ff38f71499c8586ebc /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | 1987d52691c5e686c67e7ec1b336d1f788f9cc94 (diff) | |
download | bcm5719-llvm-0b5569972f4dae062a430fa0e8cedc0021b020b8.tar.gz bcm5719-llvm-0b5569972f4dae062a430fa0e8cedc0021b020b8.zip |
MC: simplify object file selection for Windows
Windows always uses COFF unless Windows ELF is in use. Rather than checking if
Windows, MinGW, or Cygwin is being targeted, just check if the target OS is
windows and that it is not an ELF environment.
llvm-svn: 203159
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 931b3544e34..9a512d561fe 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -739,10 +739,9 @@ void MCObjectFileInfo::InitMCObjectFileInfo(StringRef TT, Reloc::Model relocm, (T.isOSDarwin() || T.getEnvironment() == Triple::MachO)) { Env = IsMachO; InitMachOMCObjectFileInfo(T); - } else if ((Arch == Triple::x86 || Arch == Triple::x86_64) && - (T.getEnvironment() != Triple::ELF) && - (T.getOS() == Triple::MinGW32 || T.getOS() == Triple::Cygwin || - T.getOS() == Triple::Win32)) { + } else if (T.isOSWindows() && T.getEnvironment() != Triple::ELF) { + assert((Arch == Triple::x86 || Arch == Triple::x86_64) && + "expected x86 or x86_64"); Env = IsCOFF; InitCOFFMCObjectFileInfo(T); } else { |