From c90c261e44e7251163602f5e0dab10c8a374a90c Mon Sep 17 00:00:00 2001 From: Yang Fan Date: Wed, 3 Feb 2021 11:04:58 +0800 Subject: [PATCH] [CSSPGO] Fix MSVC initializing truncation warning (NFC) MSVC warning: ``` \llvm-project\llvm\include\llvm\Transforms\IPO\SampleProfileProbe.h(65): warning C4305: 'initializing': truncation from 'double' to 'const float' ``` --- llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h b/llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h index cab893b..0fd79d8 100644 --- a/llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h +++ b/llvm/include/llvm/Transforms/IPO/SampleProfileProbe.h @@ -62,7 +62,7 @@ public: private: // Allow a little bias due the rounding to integral factors. - constexpr static float DistributionFactorVariance = 0.02; + constexpr static float DistributionFactorVariance = 0.02f; // Distribution factors from last pass. FuncProbeFactorMap FunctionProbeFactors; -- 2.7.4