summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/MC/MCObjectFileInfo.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp
index 931b3544e3..9a512d561f 100644
--- a/lib/MC/MCObjectFileInfo.cpp
+++ b/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 {