From 46a9f016c5fca708710e8c791675354cbf51fdfa Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 20 Jan 2012 21:51:11 +0000 Subject: More dead code removal (using -Wunreachable-code) llvm-svn: 148578 --- llvm/tools/lto/LTOCodeGenerator.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'llvm/tools/lto/LTOCodeGenerator.cpp') diff --git a/llvm/tools/lto/LTOCodeGenerator.cpp b/llvm/tools/lto/LTOCodeGenerator.cpp index 77d7dfe94e1..111f8c8f18e 100644 --- a/llvm/tools/lto/LTOCodeGenerator.cpp +++ b/llvm/tools/lto/LTOCodeGenerator.cpp @@ -34,6 +34,7 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Support/CommandLine.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Support/FormattedStream.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/SystemUtils.h" @@ -111,8 +112,7 @@ bool LTOCodeGenerator::setDebugInfo(lto_debug_model debug, std::string& errMsg) _emitDwarfDebugInfo = true; return false; } - errMsg = "unknown debug format"; - return true; + llvm_unreachable("Unknown debug format!"); } @@ -126,8 +126,7 @@ bool LTOCodeGenerator::setCodePICModel(lto_codegen_model model, _codeModel = model; return false; } - errMsg = "unknown pic model"; - return true; + llvm_unreachable("Unknown PIC model!"); } void LTOCodeGenerator::setCpu(const char* mCpu) -- cgit v1.2.3