[llvm] e2b9cd7 - [llvm-profgen] Fix build failure after 5d7950a403bec25e52.

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 16 09:21:22 PST 2022


Author: Florian Hahn
Date: 2022-12-16T17:21:12Z
New Revision: e2b9cd796b336e206bececb6026bc63dd416893e

URL: https://github.com/llvm/llvm-project/commit/e2b9cd796b336e206bececb6026bc63dd416893e
DIFF: https://github.com/llvm/llvm-project/commit/e2b9cd796b336e206bececb6026bc63dd416893e.diff

LOG: [llvm-profgen] Fix build failure after 5d7950a403bec25e52.

This fixes a build failure with libc++
(`error: no matching function for call to 'max')`

Added: 
    

Modified: 
    llvm/tools/llvm-profgen/MissingFrameInferrer.cpp

Removed: 
    


################################################################################
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;


        


More information about the llvm-commits mailing list