[llvm-profgen] Fix build failure after 5d7950a403bec25e52.
authorFlorian Hahn <flo@fhahn.com>
Fri, 16 Dec 2022 17:19:54 +0000 (17:19 +0000)
committerFlorian Hahn <flo@fhahn.com>
Fri, 16 Dec 2022 17:21:12 +0000 (17:21 +0000)
This fixes a build failure with libc++
(`error: no matching function for call to 'max')`

llvm/tools/llvm-profgen/MissingFrameInferrer.cpp

index 1b7b7cd..4a37945 100644 (file)
@@ -194,8 +194,8 @@ uint64_t MissingFrameInferrer::computeUniqueTailCallPath(
     auto &LocalPath = UniquePaths[{From, To}];
     assert((LocalPath.size() <= MaximumSearchDepth + 1) &&
            "Path should not be longer than the maximum searching depth");
-    TailCallMaxTailCallPath =
-        std::max(LocalPath.size(), TailCallMaxTailCallPath.getValue());
+    TailCallMaxTailCallPath = std::max(uint64_t(LocalPath.size()),
+                                       TailCallMaxTailCallPath.getValue());
 #endif
   } else {
     NonUniquePaths[{From, To}] = NumPaths;