aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/MI
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
commit79e238afee61b305d6391741cbda7d749ae9f626 (patch)
treef42b972222324ef4f57687eef3cf1a143f8c2e5e /llvm/unittests/MI
parent054d1aef4349f58d8d74bea658f95a839168bcce (diff)
downloadllvm-79e238afee61b305d6391741cbda7d749ae9f626.zip
llvm-79e238afee61b305d6391741cbda7d749ae9f626.tar.gz
llvm-79e238afee61b305d6391741cbda7d749ae9f626.tar.bz2
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. llvm-svn: 309911
Diffstat (limited to 'llvm/unittests/MI')
-rw-r--r--llvm/unittests/MI/LiveIntervalTest.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/unittests/MI/LiveIntervalTest.cpp b/llvm/unittests/MI/LiveIntervalTest.cpp
index 01dce37..9d1d864 100644
--- a/llvm/unittests/MI/LiveIntervalTest.cpp
+++ b/llvm/unittests/MI/LiveIntervalTest.cpp
@@ -45,9 +45,8 @@ std::unique_ptr<TargetMachine> createTargetMachine() {
return nullptr;
TargetOptions Options;
- return std::unique_ptr<TargetMachine>(
- T->createTargetMachine("AMDGPU", "", "", Options, None,
- CodeModel::Default, CodeGenOpt::Aggressive));
+ return std::unique_ptr<TargetMachine>(T->createTargetMachine(
+ "AMDGPU", "", "", Options, None, None, CodeGenOpt::Aggressive));
}
std::unique_ptr<Module> parseMIR(LLVMContext &Context,