From 35476334e994d15f775f187a51d6acdf9ae3c4a0 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 6 Mar 2014 20:47:11 +0000 Subject: Support: split object format out of environment This is a preliminary setup change to support a renaming of Windows target triples. Split the object file format information out of the environment into a separate entity. Unfortunately, file format was previously treated as an environment with an unknown OS. This is most obvious in the ARM subtarget where the handling for macho on an arbitrary platform switches to AAPCS rather than APCS (as per Apple's needs). llvm-svn: 203160 --- llvm/lib/MC/MCObjectFileInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp') diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 9a512d5..6b21cd3 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -736,10 +736,10 @@ void MCObjectFileInfo::InitMCObjectFileInfo(StringRef TT, Reloc::Model relocm, Arch == Triple::arm || Arch == Triple::thumb || Arch == Triple::ppc || Arch == Triple::ppc64 || Arch == Triple::UnknownArch) && - (T.isOSDarwin() || T.getEnvironment() == Triple::MachO)) { + (T.isOSDarwin() || T.isOSBinFormatMachO())) { Env = IsMachO; InitMachOMCObjectFileInfo(T); - } else if (T.isOSWindows() && T.getEnvironment() != Triple::ELF) { + } else if (T.isOSWindows() && !T.isOSBinFormatELF()) { assert((Arch == Triple::x86 || Arch == Triple::x86_64) && "expected x86 or x86_64"); Env = IsCOFF; -- cgit v1.1