ADT/Triple: Move a variety of clients to using isOSDarwin() and isOSWindows()

predicates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129816 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2011-04-19 21:14:45 +00:00
parent e1fe09f682
commit 912225e185
11 changed files with 78 additions and 102 deletions

View File

@@ -110,10 +110,8 @@ namespace {
TargetAsmBackend *llvm::createPPCAsmBackend(const Target &T,
const std::string &TT) {
switch (Triple(TT).getOS()) {
case Triple::Darwin:
if (Triple(TT).isOSDarwin())
return new DarwinPPCAsmBackend(T);
default:
return 0;
}
return 0;
}

View File

@@ -24,7 +24,7 @@ using namespace llvm;
static MCAsmInfo *createMCAsmInfo(const Target &T, StringRef TT) {
Triple TheTriple(TT);
bool isPPC64 = TheTriple.getArch() == Triple::ppc64;
if (TheTriple.getOS() == Triple::Darwin)
if (TheTriple.isOSDarwin())
return new PPCMCAsmInfoDarwin(isPPC64);
return new PPCLinuxMCAsmInfo(isPPC64);
@@ -37,12 +37,10 @@ static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
MCCodeEmitter *Emitter,
bool RelaxAll,
bool NoExecStack) {
switch (Triple(TT).getOS()) {
case Triple::Darwin:
if (Triple(TT).isOSDarwin())
return createMachOStreamer(Ctx, TAB, OS, Emitter, RelaxAll);
default:
return NULL;
}
return NULL;
}
extern "C" void LLVMInitializePowerPCTarget() {