fix segfault by checking for UnknownArch, since
getArchTypePrefix() will return nullptr for UnknownArch.
This fixes regression caused by r238424.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239456
91177308-0d34-0410-b5e6-
96231b3b80d8
}
void RuntimeDyldELF::setMipsABI(const ObjectFile &Obj) {
- if (!StringRef(Triple::getArchTypePrefix(Arch)).equals("mips")) {
+ if (Arch == Triple::UnknownArch ||
+ !StringRef(Triple::getArchTypePrefix(Arch)).equals("mips")) {
IsMipsO32ABI = false;
IsMipsN64ABI = false;
return;