[llvm-exegesis][NFC] Use an enum instead of a string for benchmark mode.

Summary: YAML encoding is backwards-compatible.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

Differential Revision: https://reviews.llvm.org/D47705

llvm-svn: 333886
diff --git a/llvm/tools/llvm-exegesis/lib/Latency.cpp b/llvm/tools/llvm-exegesis/lib/Latency.cpp
index 4233345..633189e 100644
--- a/llvm/tools/llvm-exegesis/lib/Latency.cpp
+++ b/llvm/tools/llvm-exegesis/lib/Latency.cpp
@@ -52,7 +52,9 @@
 
 LatencyBenchmarkRunner::~LatencyBenchmarkRunner() = default;
 
-const char *LatencyBenchmarkRunner::getDisplayName() const { return "latency"; }
+InstructionBenchmarkKey::ModeE LatencyBenchmarkRunner::getMode() const {
+  return InstructionBenchmarkKey::Latency;
+}
 
 llvm::Expected<std::vector<llvm::MCInst>>
 LatencyBenchmarkRunner::createSnippet(RegisterAliasingTrackerCache &RATC,