From e2b9cd796b336e206bececb6026bc63dd416893e Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Fri, 16 Dec 2022 17:19:54 +0000 Subject: [PATCH] [llvm-profgen] Fix build failure after 5d7950a403bec25e52. This fixes a build failure with libc++ (`error: no matching function for call to 'max')` --- llvm/tools/llvm-profgen/MissingFrameInferrer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/tools/llvm-profgen/MissingFrameInferrer.cpp b/llvm/tools/llvm-profgen/MissingFrameInferrer.cpp index 1b7b7cdb18622..4a37945320215 100644 --- a/llvm/tools/llvm-profgen/MissingFrameInferrer.cpp +++ b/llvm/tools/llvm-profgen/MissingFrameInferrer.cpp @@ -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;