[lld] r179590 - Moved llvm_unreachable out of switch blocks to avoid the "control reaches end of non-void function" warning.
Andy Gibbs
andyg1001 at hotmail.co.uk
Tue Apr 16 04:52:34 PDT 2013
Author: andyg
Date: Tue Apr 16 06:52:34 2013
New Revision: 179590
URL: http://llvm.org/viewvc/llvm-project?rev=179590&view=rev
Log:
Moved llvm_unreachable out of switch blocks to avoid the "control reaches end of non-void function" warning.
Modified:
lld/trunk/lib/Driver/UniversalDriver.cpp
lld/trunk/lib/ReaderWriter/MachO/MachOTargetInfo.cpp
Modified: lld/trunk/lib/Driver/UniversalDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/UniversalDriver.cpp?rev=179590&r1=179589&r2=179590&view=diff
==============================================================================
--- lld/trunk/lib/Driver/UniversalDriver.cpp (original)
+++ lld/trunk/lib/Driver/UniversalDriver.cpp Tue Apr 16 06:52:34 2013
@@ -125,9 +125,10 @@ bool UniversalDriver::link(int argc, con
case Flavor::core:
return CoreDriver::link(args.size(), args.data(), diagnostics);
case Flavor::win_link:
- llvm_unreachable("Unsupported flavor");
+ break;
case Flavor::invalid:
return true;
}
+ llvm_unreachable("Unsupported flavor");
}
} // end namespace lld
Modified: lld/trunk/lib/ReaderWriter/MachO/MachOTargetInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachOTargetInfo.cpp?rev=179590&r1=179589&r2=179590&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/MachO/MachOTargetInfo.cpp (original)
+++ lld/trunk/lib/ReaderWriter/MachO/MachOTargetInfo.cpp Tue Apr 16 06:52:34 2013
@@ -111,8 +111,9 @@ uint32_t MachOTargetInfo::getCPUType() c
case MachOTargetInfo::arch_armv7s:
return mach_o::CPU_TYPE_ARM;
case MachOTargetInfo::arch_unknown:
- llvm_unreachable("Unknown arch type");
+ break;
}
+ llvm_unreachable("Unknown arch type");
}
uint32_t MachOTargetInfo::getCPUSubType() const {
@@ -128,8 +129,9 @@ uint32_t MachOTargetInfo::getCPUSubType(
case MachOTargetInfo::arch_armv7s:
return mach_o::CPU_SUBTYPE_ARM_V7S;
case MachOTargetInfo::arch_unknown:
- llvm_unreachable("Unknown arch type");
+ break;
}
+ llvm_unreachable("Unknown arch type");
}
More information about the llvm-commits
mailing list