From edfc94e296f1faa6414ac91b86856b107a0568ac Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 14 Nov 2019 13:55:28 +0000 Subject: [PATCH] GCOVProfiling - fix uninitialized variable warnings + make getFuncChecksum() const. NFCI. --- llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp index b2f299a7e49d..bda32878400c 100644 --- a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp @@ -129,9 +129,9 @@ private: // Checksum, produced by hash of EdgeDestinations SmallVector FileChecksums; - Module *M; + Module *M = nullptr; std::function GetTLI; - LLVMContext *Ctx; + LLVMContext *Ctx = nullptr; SmallVector, 16> Funcs; std::vector FilterRe; std::vector ExcludeRe; @@ -385,7 +385,7 @@ namespace { return EdgeDestinations; } - uint32_t getFuncChecksum() { + uint32_t getFuncChecksum() const { return FuncChecksum; }