More work towards getting the compiler to not crash.

This commit is contained in:
Jeremy Rand 2015-07-17 22:22:50 -05:00
parent 6900b043ed
commit 9bb9bf24c8
3 changed files with 9 additions and 1 deletions

View File

@ -90,6 +90,7 @@ const char *Triple::getArchTypePrefix(ArchType Kind) {
case amdil: return "amdil";
case spir: return "spir";
case spir64: return "spir";
case wdc65816: return "wdc65816";
}
}
@ -188,6 +189,7 @@ Triple::ArchType Triple::getArchTypeForLLVMName(StringRef Name) {
.Case("amdil", amdil)
.Case("spir", spir)
.Case("spir64", spir64)
.Case("wdc65816", wdc65816)
.Default(UnknownArch);
}
@ -214,6 +216,7 @@ const char *Triple::getArchNameForAssembler() {
.Case("amdil", "amdil")
.Case("spir", "spir")
.Case("spir64", "spir64")
.Case("wdc65816", "wdc65816")
.Default(NULL);
}
@ -251,6 +254,7 @@ static Triple::ArchType parseArch(StringRef ArchName) {
.Case("amdil", Triple::amdil)
.Case("spir", Triple::spir)
.Case("spir64", Triple::spir64)
.Case("wdc65816", Triple::wdc65816)
.Default(Triple::UnknownArch);
}

View File

@ -54,6 +54,10 @@ namespace {
};
} // namespace
TargetPassConfig *WDC65816TargetMachine::createPassConfig(PassManagerBase &PM) {
return new WDC65816PassConfig(this, PM);
}
bool WDC65816PassConfig::addInstSelector() {
addPass(createWDC65816ISelDag(getWDC65816TargetMachine()));
return false;

View File

@ -52,9 +52,9 @@ namespace llvm {
}
virtual const DataLayout *getDataLayout() const { return &DL; }
#if 0 // WDC_TODO - Do I need this? I think these are both related to JIT
// Pass Pipeline Configuration
virtual TargetPassConfig *createPassConfig(PassManagerBase &PM);
#if 0 // WDC_TODO - Do I need this? I think this is related to JIT
virtual bool addCodeEmitter(PassManagerBase &PM, JITCodeEmitter &JCE);
#endif
};