diff options
author | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-03-06 20:47:11 +0000 |
---|---|---|
committer | Saleem Abdulrasool <compnerd@compnerd.org> | 2014-03-06 20:47:11 +0000 |
commit | 4eb048a6f1b9777d31d71684204deb1b39aa1795 (patch) | |
tree | 956cabeaa8603c93307b2cff38b51e12fa34af78 /lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp | |
parent | 5219b0f586e901b0aee7c927d97cf6d43f8fc49d (diff) | |
download | llvm-4eb048a6f1b9777d31d71684204deb1b39aa1795.tar.gz llvm-4eb048a6f1b9777d31d71684204deb1b39aa1795.tar.bz2 llvm-4eb048a6f1b9777d31d71684204deb1b39aa1795.tar.xz |
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).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203160 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp')
-rw-r--r-- | lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp index 81ac4ad47e..8deba94c80 100644 --- a/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp +++ b/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp @@ -276,7 +276,7 @@ static MCAsmInfo *createX86MCAsmInfo(const MCRegisterInfo &MRI, StringRef TT) { MAI = new X86_64MCAsmInfoDarwin(TheTriple); else MAI = new X86MCAsmInfoDarwin(TheTriple); - } else if (TheTriple.getEnvironment() == Triple::ELF) { + } else if (TheTriple.isOSBinFormatELF()) { // Force the use of an ELF container. MAI = new X86ELFMCAsmInfo(TheTriple); } else if (TheTriple.getOS() == Triple::Win32) { @@ -370,7 +370,7 @@ static MCStreamer *createMCStreamer(const Target &T, StringRef TT, if (TheTriple.isOSBinFormatMachO()) return createMachOStreamer(Ctx, MAB, _OS, _Emitter, RelaxAll); - if (TheTriple.isOSWindows() && TheTriple.getEnvironment() != Triple::ELF) + if (TheTriple.isOSWindows() && !TheTriple.isOSBinFormatELF()) return createWinCOFFStreamer(Ctx, MAB, *_Emitter, _OS, RelaxAll); return createELFStreamer(Ctx, MAB, _OS, _Emitter, RelaxAll, NoExecStack); |