diff options
| author | Alexei Starovoitov <alexei.starovoitov@gmail.com> | 2015-06-10 03:06:06 +0000 |
|---|---|---|
| committer | Alexei Starovoitov <alexei.starovoitov@gmail.com> | 2015-06-10 03:06:06 +0000 |
| commit | a38e1982227952be8c6117d4c33b3041efa67815 (patch) | |
| tree | eaeff9d8661a60a56c33a55f6cfff8b0f6e5873d | |
| parent | 8e29d7162352426ecb8d178989d7279f344d423d (diff) | |
| download | bcm5719-llvm-a38e1982227952be8c6117d4c33b3041efa67815.tar.gz bcm5719-llvm-a38e1982227952be8c6117d4c33b3041efa67815.zip | |
fix crash
fix segfault by checking for UnknownArch, since
getArchTypePrefix() will return nullptr for UnknownArch.
This fixes regression caused by r238424.
llvm-svn: 239456
| -rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index b4a34e8acf3..5c39c5944e4 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -519,7 +519,8 @@ void RuntimeDyldELF::resolveMIPSRelocation(const SectionEntry &Section, } 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; |

