Make Triple's isOSBinFormatXXX functions partition triple-space.

Most users would be surprised if "isCOFF" and "isMachO" were simultaneously
true, unless they'd put the compiler in a box with a gun attached to a photon
detector.

This makes sure precisely one of the three formats is true for any triple and
simplifies some target logic based on that.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196934 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Tim Northover
2013-12-10 16:57:43 +00:00
parent 8b71466c43
commit 7af55ad434
8 changed files with 22 additions and 26 deletions

View File

@@ -268,7 +268,7 @@ static MCInstPrinter *createARMMCInstPrinter(const Target &T,
static MCRelocationInfo *createARMMCRelocationInfo(StringRef TT,
MCContext &Ctx) {
Triple TheTriple(TT);
if (TheTriple.isEnvironmentMachO())
if (TheTriple.isOSBinFormatMachO())
return createARMMachORelocationInfo(Ctx);
// Default to the stock relocation info.
return llvm::createMCRelocationInfo(TT, Ctx);