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
This commit is contained in:
Saleem Abdulrasool
2014-03-06 20:47:11 +00:00
parent 0b5569972f
commit 35476334e9
9 changed files with 96 additions and 26 deletions

View File

@@ -166,7 +166,7 @@ static const Target *getTarget(const ObjectFile *Obj = NULL) {
// TheTriple defaults to ELF, and COFF doesn't have an environment:
// the best we can do here is indicate that it is mach-o.
if (Obj->isMachO())
TheTriple.setEnvironment(Triple::MachO);
TheTriple.setObjectFormat(Triple::MachO);
}
} else
TheTriple.setTriple(Triple::normalize(TripleName));