summaryrefslogtreecommitdiff
path: root/tools/opt
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-08-03 02:16:21 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-08-03 02:16:21 +0000
commit9aafb854cc7cb8df8338c50cb411a54ce1e09796 (patch)
tree904ca934d72726b3c0e0736d9027056ee11751a7 /tools/opt
parent65d41d8235523f0913767507b6c816e16caa2594 (diff)
Delete Default and JITDefault code models
IMHO it is an antipattern to have a enum value that is Default. At any given piece of code it is not clear if we have to handle Default or if has already been mapped to a concrete value. In this case in particular, only the target can do the mapping and it is nice to make sure it is always done. This deletes the two default enum values of CodeModel and uses an explicit Optional<CodeModel> when it is possible that it is unspecified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309911 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt')
-rw-r--r--tools/opt/opt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp
index 24cce58047f..7bbdb7ebb23 100644
--- a/tools/opt/opt.cpp
+++ b/tools/opt/opt.cpp
@@ -349,7 +349,7 @@ static TargetMachine* GetTargetMachine(Triple TheTriple, StringRef CPUStr,
return TheTarget->createTargetMachine(TheTriple.getTriple(), CPUStr,
FeaturesStr, Options, getRelocModel(),
- CMModel, GetCodeGenOptLevel());
+ getCodeModel(), GetCodeGenOptLevel());
}
#ifdef LINK_POLLY_INTO_TOOLS