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