summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/gold/gold-plugin.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp
index 369e2fbee22..57026f8d0ef 100644
--- a/llvm/tools/gold/gold-plugin.cpp
+++ b/llvm/tools/gold/gold-plugin.cpp
@@ -901,22 +901,17 @@ static SubtargetFeatures getFeatures(Triple &TheTriple) {
}
static CodeGenOpt::Level getCGOptLevel() {
- CodeGenOpt::Level CGOptLevel;
switch (options::OptLevel) {
case 0:
- CGOptLevel = CodeGenOpt::None;
- break;
+ return CodeGenOpt::None;
case 1:
- CGOptLevel = CodeGenOpt::Less;
- break;
+ return CodeGenOpt::Less;
case 2:
- CGOptLevel = CodeGenOpt::Default;
- break;
+ return CodeGenOpt::Default;
case 3:
- CGOptLevel = CodeGenOpt::Aggressive;
- break;
+ return CodeGenOpt::Aggressive;
}
- return CGOptLevel;
+ llvm_unreachable("Invalid optimization level");
}
void CodeGen::initTargetMachine() {
OpenPOWER on IntegriCloud