18 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
23 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
27std::optional<llvm::StringRef>
29 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
30 if (input_str.size() < 2)
42 input_str = input_str.drop_front();
45 if (input_str.front() ==
'-') {
46 if (input_str.drop_front(1).getAsInteger(0, idx))
52 if (input_str.getAsInteger(0, idx))
62 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
73 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
80 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
91 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
96 size_t stop_idx)
const {
97 std::lock_guard<std::recursive_mutex> guard(
m_mutex);
98 stop_idx = std::min(stop_idx + 1,
m_history.size());
99 for (
size_t counter = start_idx; counter < stop_idx; counter++) {
100 const std::string hist_item =
m_history[counter];
101 if (!hist_item.empty()) {
103 stream.
Printf(
"%4" PRIu64
": %s\n", (uint64_t)counter, hist_item.c_str());
std::optional< llvm::StringRef > FindString(llvm::StringRef input_str) const
static const char g_repeat_char
llvm::StringRef GetRecentmostString() const
void Dump(Stream &stream, size_t start_idx=0, size_t stop_idx=SIZE_MAX) const
llvm::StringRef GetStringAtIndex(size_t idx) const
void AppendString(llvm::StringRef str, bool reject_if_dupe=true)
std::recursive_mutex m_mutex
llvm::StringRef operator[](size_t idx) const
A stream class that can stream formatted output to a file.
size_t Indent(llvm::StringRef s="")
Indent the current line in the stream.
size_t Printf(const char *format,...) __attribute__((format(printf
Output printf formatted output to the stream.
A class that represents a running process on the host machine.