[lld] 1440d45 - Fix MSVC "not all control paths return a value" warning. NFCI.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 9 04:07:56 PDT 2021


Author: Simon Pilgrim
Date: 2021-07-09T12:07:34+01:00
New Revision: 1440d4564f79b2f7bee8fc25fc9596f10c6aa3a6

URL: https://github.com/llvm/llvm-project/commit/1440d4564f79b2f7bee8fc25fc9596f10c6aa3a6
DIFF: https://github.com/llvm/llvm-project/commit/1440d4564f79b2f7bee8fc25fc9596f10c6aa3a6.diff

LOG: Fix MSVC "not all control paths return a value" warning. NFCI.

Added: 
    

Modified: 
    lld/ELF/SyntheticSections.cpp

Removed: 
    


################################################################################
diff  --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp
index 55cd2715ab76..3496df1d2814 100644
--- a/lld/ELF/SyntheticSections.cpp
+++ b/lld/ELF/SyntheticSections.cpp
@@ -1589,6 +1589,7 @@ int64_t DynamicReloc::computeAddend() const {
     assert(sym == nullptr);
     return getMipsPageAddr(outputSec->addr) + addend;
   }
+  llvm_unreachable("Unknown DynamicReloc::Kind enum");
 }
 
 uint32_t DynamicReloc::getSymIndex(SymbolTableBaseSection *symTab) const {


        


More information about the llvm-commits mailing list