diff options
| author | Rui Ueyama <ruiu@google.com> | 2015-08-31 06:32:25 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2015-08-31 06:32:25 +0000 |
| commit | 692f8683d7db227d49ee3dad45c87ab840f039c3 (patch) | |
| tree | 78cb743802ea119b8629905bc6f80a7f3cbc7277 | |
| parent | a41a3670568c4a6a727bc9d965d6c3389f7545d5 (diff) | |
| download | bcm5719-llvm-692f8683d7db227d49ee3dad45c87ab840f039c3.tar.gz bcm5719-llvm-692f8683d7db227d49ee3dad45c87ab840f039c3.zip | |
ELF: Fix "not all control paths return a value" warning.
llvm-svn: 246417
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp b/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp index 2e72fa39ee2..6e8d82be0e6 100644 --- a/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp +++ b/lld/lib/ReaderWriter/ELF/Mips/MipsLinkingContext.cpp @@ -49,12 +49,14 @@ uint64_t MipsLinkingContext::getBaseAddress() const { if (_baseAddress != 0 || getOutputELFType() != llvm::ELF::ET_EXEC) return _baseAddress; switch (getAbi()) { - case MipsAbi::O32: - return 0x0400000; - case MipsAbi::N32: - return 0x10000000; - case MipsAbi::N64: - return 0x120000000; + case MipsAbi::O32: + return 0x0400000; + case MipsAbi::N32: + return 0x10000000; + case MipsAbi::N64: + return 0x120000000; + default: + llvm_unreachable("unknown MIPS ABI flag"); } } @@ -66,12 +68,14 @@ StringRef MipsLinkingContext::entrySymbolName() const { StringRef MipsLinkingContext::getDefaultInterpreter() const { switch (getAbi()) { - case MipsAbi::O32: - return "/lib/ld.so.1"; - case MipsAbi::N32: - return "/lib32/ld.so.1"; - case MipsAbi::N64: - return "/lib64/ld.so.1"; + case MipsAbi::O32: + return "/lib/ld.so.1"; + case MipsAbi::N32: + return "/lib32/ld.so.1"; + case MipsAbi::N64: + return "/lib64/ld.so.1"; + default: + llvm_unreachable("unknown MIPS ABI flag"); } } |

