[llvm] 475e736 - [MemProf] Include <ctime> to avoid MSVC failure (#114246)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 08:28:26 PDT 2024
Author: Teresa Johnson
Date: 2024-10-30T08:28:22-07:00
New Revision: 475e736bb5eeea8ec70aca51d1a3d98179c69530
URL: https://github.com/llvm/llvm-project/commit/475e736bb5eeea8ec70aca51d1a3d98179c69530
DIFF: https://github.com/llvm/llvm-project/commit/475e736bb5eeea8ec70aca51d1a3d98179c69530.diff
LOG: [MemProf] Include <ctime> to avoid MSVC failure (#114246)
My change in bb3915149a7c9b1660db9caebfc96343352e8454 added a call to
std::time which worked generally as there must be some transitive
include of <ctime>. However, I saw one MSVC bot failure:
InstrProfWriter.cpp(202): error C2039: 'time': is not a member of 'std'
from https://lab.llvm.org/buildbot/#/builders/63/builds/2325.
Presumably explictly including <ctime> should fix this.
Added:
Modified:
llvm/lib/ProfileData/InstrProfWriter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ProfileData/InstrProfWriter.cpp b/llvm/lib/ProfileData/InstrProfWriter.cpp
index f09241681b92a5..0ab9f942a08589 100644
--- a/llvm/lib/ProfileData/InstrProfWriter.cpp
+++ b/llvm/lib/ProfileData/InstrProfWriter.cpp
@@ -29,6 +29,7 @@
#include "llvm/Support/OnDiskHashTable.h"
#include "llvm/Support/raw_ostream.h"
#include <cstdint>
+#include <ctime>
#include <memory>
#include <string>
#include <tuple>
More information about the llvm-commits
mailing list