From: Florian Hahn Date: Fri, 16 Dec 2022 17:19:54 +0000 (+0000) Subject: [llvm-profgen] Fix build failure after 5d7950a403bec25e52. X-Git-Tag: upstream/17.0.6~23530 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e2b9cd796b336e206bececb6026bc63dd416893e;p=platform%2Fupstream%2Fllvm.git [llvm-profgen] Fix build failure after 5d7950a403bec25e52. This fixes a build failure with libc++ (`error: no matching function for call to 'max')` --- diff --git a/llvm/tools/llvm-profgen/MissingFrameInferrer.cpp b/llvm/tools/llvm-profgen/MissingFrameInferrer.cpp index 1b7b7cd..4a37945 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;