Fix various issues (or do cleanups) found by enabling certain MSVC warnings.
[oota-llvm.git] / lib / ExecutionEngine / RuntimeDyld / RuntimeDyldMachO.cpp
index 669ff4c6f8e02d7dafd4aae001b27c730dd49255..75e4f71ed8cee2094204a69a7f28328eb5db2d22 100644 (file)
@@ -26,7 +26,7 @@ resolveRelocation(uint8_t *Address, uint64_t Value, bool isPCRel,
                   unsigned Type, unsigned Size, int64_t Addend) {
   // This just dispatches to the proper target specific routine.
   switch (CPUType) {
-  default: assert(0 && "Unsupported CPU type!");
+  default: llvm_unreachable("Unsupported CPU type!");
   case mach::CTM_x86_64:
     return resolveX86_64Relocation((uintptr_t)Address, (uintptr_t)Value,
                                    isPCRel, Type, Size, Addend);
@@ -91,7 +91,6 @@ resolveARMRelocation(uintptr_t Address, uintptr_t Value, bool isPCRel,
   default:
     llvm_unreachable("Invalid relocation type!");
   case macho::RIT_Vanilla: {
-    llvm_unreachable("Invalid relocation type!");
     // Mask in the target value a byte at a time (we don't have an alignment
     // guarantee for the target address, so this is safest).
     uint8_t *p = (uint8_t*)Address;