aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2012-01-17 04:43:56 +0000
committerDavid Blaikie <dblaikie@gmail.com>2012-01-17 04:43:56 +0000
commitfdebc38523b397743973ff6a2d2e93b112dd96e5 (patch)
tree03c93b31dc3e434c640e0180231461400e390529 /lib/VMCore
parent21506061ef031a01fce5cc1781f30780fbecb59b (diff)
downloadexternal_llvm-fdebc38523b397743973ff6a2d2e93b112dd96e5.zip
external_llvm-fdebc38523b397743973ff6a2d2e93b112dd96e5.tar.gz
external_llvm-fdebc38523b397743973ff6a2d2e93b112dd96e5.tar.bz2
Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148284 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/ConstantsContext.h1
-rw-r--r--lib/VMCore/Core.cpp3
-rw-r--r--lib/VMCore/Instruction.cpp2
3 files changed, 1 insertions, 5 deletions
diff --git a/lib/VMCore/ConstantsContext.h b/lib/VMCore/ConstantsContext.h
index cfcdf13..4ee4296 100644
--- a/lib/VMCore/ConstantsContext.h
+++ b/lib/VMCore/ConstantsContext.h
@@ -458,7 +458,6 @@ struct ConstantCreator<ConstantExpr, Type, ExprMapKeyType> {
return new CompareConstantExpr(Ty, Instruction::FCmp, V.subclassdata,
V.operands[0], V.operands[1]);
llvm_unreachable("Invalid ConstantExpr!");
- return 0;
}
};
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp
index 35315df..82edb3a 100644
--- a/lib/VMCore/Core.cpp
+++ b/lib/VMCore/Core.cpp
@@ -1092,8 +1092,7 @@ LLVMLinkage LLVMGetLinkage(LLVMValueRef Global) {
return LLVMCommonLinkage;
}
- // Should never get here.
- return static_cast<LLVMLinkage>(0);
+ llvm_unreachable("Make GCC's unreachability happy");
}
void LLVMSetLinkage(LLVMValueRef Global, LLVMLinkage Linkage) {
diff --git a/lib/VMCore/Instruction.cpp b/lib/VMCore/Instruction.cpp
index 8c8fbf9..e0e0709 100644
--- a/lib/VMCore/Instruction.cpp
+++ b/lib/VMCore/Instruction.cpp
@@ -166,8 +166,6 @@ const char *Instruction::getOpcodeName(unsigned OpCode) {
default: return "<Invalid operator> ";
}
-
- return 0;
}
/// isIdenticalTo - Return true if the specified instruction is exactly