[llvm] r203159 - MC: simplify object file selection for Windows
Saleem Abdulrasool
compnerd at compnerd.org
Thu Mar 6 12:47:03 PST 2014
Author: compnerd
Date: Thu Mar 6 14:47:03 2014
New Revision: 203159
URL: http://llvm.org/viewvc/llvm-project?rev=203159&view=rev
Log:
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.
Modified:
llvm/trunk/lib/MC/MCObjectFileInfo.cpp
Modified: llvm/trunk/lib/MC/MCObjectFileInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectFileInfo.cpp?rev=203159&r1=203158&r2=203159&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectFileInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectFileInfo.cpp Thu Mar 6 14:47:03 2014
@@ -739,10 +739,9 @@ void MCObjectFileInfo::InitMCObjectFileI
(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 {
More information about the llvm-commits
mailing list