diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-11-08 16:25:26 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2019-11-08 16:26:21 +0000 |
commit | abe9dd4e58d28c0d456fb61559ada1403c49c86b (patch) | |
tree | 01154dea8646728a48b34f805cd0b64a3b57dcff /llvm/lib/Support | |
parent | 66f63d18e1d08dd7364f2c267264b7103673cde6 (diff) | |
download | bcm5719-llvm-abe9dd4e58d28c0d456fb61559ada1403c49c86b.tar.gz bcm5719-llvm-abe9dd4e58d28c0d456fb61559ada1403c49c86b.zip |
TimeTraceProfiler - fix uninitialized variable warning. NFCI.
Diffstat (limited to 'llvm/lib/Support')
-rw-r--r-- | llvm/lib/Support/TimeProfiler.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Support/TimeProfiler.cpp b/llvm/lib/Support/TimeProfiler.cpp index ca9119e30b6..c3d742388aa 100644 --- a/llvm/lib/Support/TimeProfiler.cpp +++ b/llvm/lib/Support/TimeProfiler.cpp @@ -59,7 +59,8 @@ struct Entry { }; struct TimeTraceProfiler { - TimeTraceProfiler() { + TimeTraceProfiler(unsigned TimeTraceGranularity = 0) + : TimeTraceGranularity(TimeTraceGranularity) { StartTime = steady_clock::now(); } @@ -188,8 +189,7 @@ struct TimeTraceProfiler { void timeTraceProfilerInitialize(unsigned TimeTraceGranularity) { assert(TimeTraceProfilerInstance == nullptr && "Profiler should not be initialized"); - TimeTraceProfilerInstance = new TimeTraceProfiler(); - TimeTraceProfilerInstance->TimeTraceGranularity = TimeTraceGranularity; + TimeTraceProfilerInstance = new TimeTraceProfiler(TimeTraceGranularity); } void timeTraceProfilerCleanup() { |