diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-11-14 13:55:28 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-11-14 14:21:18 +0000 |
commit | edfc94e296f1faa6414ac91b86856b107a0568ac (patch) | |
tree | 61302ce530cac3fc940b5f64e2a41014d0031adb /llvm/lib/Transforms | |
parent | 39c0829a55468854aac92c68d56f211a89537ee8 (diff) | |
download | bcm5719-llvm-edfc94e296f1faa6414ac91b86856b107a0568ac.tar.gz bcm5719-llvm-edfc94e296f1faa6414ac91b86856b107a0568ac.zip |
GCOVProfiling - fix uninitialized variable warnings + make getFuncChecksum() const. NFCI.
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp b/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp index b2f299a7e49..bda32878400 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<uint32_t, 4> FileChecksums; - Module *M; + Module *M = nullptr; std::function<const TargetLibraryInfo &(Function &F)> GetTLI; - LLVMContext *Ctx; + LLVMContext *Ctx = nullptr; SmallVector<std::unique_ptr<GCOVFunction>, 16> Funcs; std::vector<Regex> FilterRe; std::vector<Regex> ExcludeRe; @@ -385,7 +385,7 @@ namespace { return EdgeDestinations; } - uint32_t getFuncChecksum() { + uint32_t getFuncChecksum() const { return FuncChecksum; } |