BuildBot fix, compiler complains about array decay to pointer
authorGuillaume Chatelet <gchatelet@google.com>
Wed, 17 Oct 2018 12:09:21 +0000 (12:09 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Wed, 17 Oct 2018 12:09:21 +0000 (12:09 +0000)
llvm-svn: 344690

llvm/tools/llvm-exegesis/lib/CodeTemplate.cpp

index df9d18b..614d474 100644 (file)
@@ -92,18 +92,17 @@ llvm::StringRef getName(ExecutionMode Bit) {
   llvm_unreachable("Missing enum case");
 }
 
-static const ExecutionMode kAllExecutionModeBits[] = {
-    ExecutionMode::ALWAYS_SERIAL_IMPLICIT_REGS_ALIAS,
-    ExecutionMode::ALWAYS_SERIAL_TIED_REGS_ALIAS,
-    ExecutionMode::SERIAL_VIA_MEMORY_INSTR,
-    ExecutionMode::SERIAL_VIA_EXPLICIT_REGS,
-    ExecutionMode::SERIAL_VIA_NON_MEMORY_INSTR,
-    ExecutionMode::ALWAYS_PARALLEL_MISSING_USE_OR_DEF,
-    ExecutionMode::PARALLEL_VIA_EXPLICIT_REGS,
-};
-
 llvm::ArrayRef<ExecutionMode> getAllExecutionBits() {
-  return kAllExecutionModeBits;
+  static const ExecutionMode kAllExecutionModeBits[] = {
+      ExecutionMode::ALWAYS_SERIAL_IMPLICIT_REGS_ALIAS,
+      ExecutionMode::ALWAYS_SERIAL_TIED_REGS_ALIAS,
+      ExecutionMode::SERIAL_VIA_MEMORY_INSTR,
+      ExecutionMode::SERIAL_VIA_EXPLICIT_REGS,
+      ExecutionMode::SERIAL_VIA_NON_MEMORY_INSTR,
+      ExecutionMode::ALWAYS_PARALLEL_MISSING_USE_OR_DEF,
+      ExecutionMode::PARALLEL_VIA_EXPLICIT_REGS,
+  };
+  return llvm::makeArrayRef(kAllExecutionModeBits);
 }
 
 llvm::SmallVector<ExecutionMode, 4>