[llvm-exegesis] Fix compilation before c++17.
authorClement Courbet <courbet@google.com>
Fri, 22 Mar 2019 13:37:39 +0000 (13:37 +0000)
committerClement Courbet <courbet@google.com>
Fri, 22 Mar 2019 13:37:39 +0000 (13:37 +0000)
ClusteringTest.cpp:25:23: error: constexpr variable cannot have non-literal type 'const llvm::exegesis::(anonymous namespace)::(lambda at /home/buildslave/ps4-buildslave4/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.src/unittests/tools/llvm-exegesis/ClusteringTest.cpp:25:35)'
static constexpr auto HasPoints = [](const std::vector<int> &Indices) {

llvm-svn: 356748

llvm/unittests/tools/llvm-exegesis/ClusteringTest.cpp

index 174dd43..2833d55 100644 (file)
@@ -22,7 +22,7 @@ using testing::Field;
 using testing::UnorderedElementsAre;
 using testing::UnorderedElementsAreArray;
 
-static constexpr auto HasPoints = [](const std::vector<int> &Indices) {
+static const auto HasPoints = [](const std::vector<int> &Indices) {
   return Field(&InstructionBenchmarkClustering::Cluster::PointIndices,
                  UnorderedElementsAreArray(Indices));
 };