Coverage Report

Created: 2022-01-25 06:29

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/include/lldb/Utility/Log.h
Line
Count
Source (jump to first uncovered line)
1
//===-- Log.h ---------------------------------------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#ifndef LLDB_UTILITY_LOG_H
10
#define LLDB_UTILITY_LOG_H
11
12
#include "lldb/Utility/Flags.h"
13
#include "lldb/Utility/Logging.h"
14
#include "lldb/lldb-defines.h"
15
16
#include "llvm/ADT/ArrayRef.h"
17
#include "llvm/ADT/STLExtras.h"
18
#include "llvm/ADT/StringMap.h"
19
#include "llvm/ADT/StringRef.h"
20
#include "llvm/Support/Error.h"
21
#include "llvm/Support/FormatVariadic.h"
22
#include "llvm/Support/ManagedStatic.h"
23
#include "llvm/Support/RWMutex.h"
24
25
#include <atomic>
26
#include <cstdarg>
27
#include <cstdint>
28
#include <memory>
29
#include <string>
30
#include <type_traits>
31
32
namespace llvm {
33
class raw_ostream;
34
}
35
// Logging Options
36
23.1k
#define LLDB_LOG_OPTION_THREADSAFE (1u << 0)
37
7.66k
#define LLDB_LOG_OPTION_VERBOSE (1u << 1)
38
23.0k
#define LLDB_LOG_OPTION_PREPEND_SEQUENCE (1u << 3)
39
23.0k
#define LLDB_LOG_OPTION_PREPEND_TIMESTAMP (1u << 4)
40
23.0k
#define LLDB_LOG_OPTION_PREPEND_PROC_AND_THREAD (1u << 5)
41
23.1k
#define LLDB_LOG_OPTION_PREPEND_THREAD_NAME (1U << 6)
42
23.0k
#define LLDB_LOG_OPTION_BACKTRACE (1U << 7)
43
43
#define LLDB_LOG_OPTION_APPEND (1U << 8)
44
23.0k
#define LLDB_LOG_OPTION_PREPEND_FILE_FUNCTION (1U << 9)
45
46
// Logging Functions
47
namespace lldb_private {
48
49
class Log final {
50
public:
51
  // Description of a log channel category.
52
  struct Category {
53
    llvm::StringLiteral name;
54
    llvm::StringLiteral description;
55
    uint32_t flag;
56
  };
57
58
  // This class describes a log channel. It also encapsulates the behavior
59
  // necessary to enable a log channel in an atomic manner.
60
  class Channel {
61
    std::atomic<Log *> log_ptr;
62
    friend class Log;
63
64
  public:
65
    const llvm::ArrayRef<Category> categories;
66
    const uint32_t default_flags;
67
68
    constexpr Channel(llvm::ArrayRef<Log::Category> categories,
69
                      uint32_t default_flags)
70
        : log_ptr(nullptr), categories(categories),
71
0
          default_flags(default_flags) {}
72
73
    // This function is safe to call at any time. If the channel is disabled
74
    // after (or concurrently with) this function returning a non-null Log
75
    // pointer, it is still safe to attempt to write to the Log object -- the
76
    // output will be discarded.
77
45.9M
    Log *GetLogIfAll(uint32_t mask) {
78
45.9M
      Log *log = log_ptr.load(std::memory_order_relaxed);
79
45.9M
      if (log && 
log->GetMask().AllSet(mask)170k
)
80
25.4k
        return log;
81
45.9M
      return nullptr;
82
45.9M
    }
83
84
    // This function is safe to call at any time. If the channel is disabled
85
    // after (or concurrently with) this function returning a non-null Log
86
    // pointer, it is still safe to attempt to write to the Log object -- the
87
    // output will be discarded.
88
4.22M
    Log *GetLogIfAny(uint32_t mask) {
89
4.22M
      Log *log = log_ptr.load(std::memory_order_relaxed);
90
4.22M
      if (log && 
log->GetMask().AnySet(mask)15.9k
)
91
253
        return log;
92
4.22M
      return nullptr;
93
4.22M
    }
94
  };
95
96
97
  static void Initialize();
98
99
  // Static accessors for logging channels
100
  static void Register(llvm::StringRef name, Channel &channel);
101
  static void Unregister(llvm::StringRef name);
102
103
  static bool
104
  EnableLogChannel(const std::shared_ptr<llvm::raw_ostream> &log_stream_sp,
105
                   uint32_t log_options, llvm::StringRef channel,
106
                   llvm::ArrayRef<const char *> categories,
107
                   llvm::raw_ostream &error_stream);
108
109
  static bool DisableLogChannel(llvm::StringRef channel,
110
                                llvm::ArrayRef<const char *> categories,
111
                                llvm::raw_ostream &error_stream);
112
113
  static bool ListChannelCategories(llvm::StringRef channel,
114
                                    llvm::raw_ostream &stream);
115
116
  /// Returns the list of log channels.
117
  static std::vector<llvm::StringRef> ListChannels();
118
  /// Calls the given lambda for every category in the given channel.
119
  /// If no channel with the given name exists, lambda is never called.
120
  static void ForEachChannelCategory(
121
      llvm::StringRef channel,
122
      llvm::function_ref<void(llvm::StringRef, llvm::StringRef)> lambda);
123
124
  static void DisableAllLogChannels();
125
126
  static void ListAllLogChannels(llvm::raw_ostream &stream);
127
128
  // Member functions
129
  //
130
  // These functions are safe to call at any time you have a Log* obtained from
131
  // the Channel class. If logging is disabled between you obtaining the Log
132
  // object and writing to it, the output will be silently discarded.
133
13.8k
  Log(Channel &channel) : m_channel(channel) {}
134
3.75k
  ~Log() = default;
135
136
  void PutCString(const char *cstr);
137
  void PutString(llvm::StringRef str);
138
139
  template <typename... Args>
140
  void Format(llvm::StringRef file, llvm::StringRef function,
141
4.22k
              const char *format, Args &&... args) {
142
4.22k
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
4.22k
  }
void lldb_private::Log::Format<lldb_private::FileSpec&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::FileSpec&)
Line
Count
Source
141
2
              const char *format, Args &&... args) {
142
2
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
2
  }
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::WaitStatus&, bool&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::WaitStatus&, bool&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::WaitStatus&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::WaitStatus&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, unsigned long long, lldb_private::Status&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, unsigned long long&&, lldb_private::Status&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb::StateType&, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, lldb::StateType&, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, unsigned int&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, unsigned int&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::iterator_range<unsigned char const*>, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, llvm::iterator_range<unsigned char const*>&&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, llvm::iterator_range<unsigned char const*> >(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, llvm::iterator_range<unsigned char const*>&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, llvm::iterator_range<unsigned char*> >(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, llvm::iterator_range<unsigned char*>&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, unsigned long long, unsigned long long const&, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, unsigned long long&&, unsigned long long const&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, bool&, int&, int&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, bool&, int&, int&)
void lldb_private::Log::Format<>(llvm::StringRef, llvm::StringRef, char const*)
Line
Count
Source
141
155
              const char *format, Args &&... args) {
142
155
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
155
  }
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConnectionFileDescriptor*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConnectionFileDescriptor*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConnectionFileDescriptor*, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConnectionFileDescriptor*&&, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::StringRef>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Timeout<std::__1::ratio<1l, 1000000l> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, lldb_private::Status&, unsigned long&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, lldb_private::Status&, unsigned long&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long>(llvm::StringRef, llvm::StringRef, char const*, unsigned long&&)
void lldb_private::Log::Format<llvm::StringRef&>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&)
Line
Count
Source
141
20
              const char *format, Args &&... args) {
142
20
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
20
  }
void lldb_private::Log::Format<unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&)
Line
Count
Source
141
15
              const char *format, Args &&... args) {
142
15
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
15
  }
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >&>(llvm::StringRef, llvm::StringRef, char const*, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000l> >&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, lldb_private::WaitStatus&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, lldb_private::WaitStatus&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, unsigned long long&, int&, int, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, unsigned long long&, int&, int&&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, lldb_private::Status&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, lldb_private::Status&)
void lldb_private::Log::Format<char const*>(llvm::StringRef, llvm::StringRef, char const*, char const*&&)
Line
Count
Source
141
30
              const char *format, Args &&... args) {
142
30
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
30
  }
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, lldb::StateType&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, lldb::StateType&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned int&, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, unsigned int&, unsigned long long&&)
void lldb_private::Log::Format<unsigned int&>(llvm::StringRef, llvm::StringRef, char const*, unsigned int&)
Line
Count
Source
141
36
              const char *format, Args &&... args) {
142
36
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
36
  }
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, unsigned long long const&, unsigned long long const&, unsigned long long const&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, unsigned long long const&, unsigned long long const&, unsigned long long const&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, unsigned long long const&, lldb_private::Status&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, unsigned long long const&, lldb_private::Status&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, unsigned long long const&, unsigned long long const&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, unsigned long long const&, unsigned long long const&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, lldb_private::Status const&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, lldb_private::Status const&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, unsigned int const&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, unsigned int const&)
void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Line
Count
Source
141
48
              const char *format, Args &&... args) {
142
48
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
48
  }
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::Status&>(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::Status&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Status&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Status&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned int>(llvm::StringRef, llvm::StringRef, char const*, unsigned int&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Communication*, char const*&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Communication*&&, char const*&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Communication*, char const*>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Communication*&&, char const*&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Communication*>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Communication*&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Communication*, void*&, unsigned long&, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&, lldb_private::Connection*>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Communication*&&, void*&, unsigned long&, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&, lldb_private::Connection*&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Communication*, void const*&, unsigned long long, lldb_private::Connection*>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Communication*&&, void const*&, unsigned long long&&, lldb_private::Connection*&&)
void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Line
Count
Source
141
3.14k
              const char *format, Args &&... args) {
142
3.14k
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
3.14k
  }
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Communication*, unsigned char const*&, unsigned long long, bool&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Communication*&&, unsigned char const*&, unsigned long long&&, bool&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Status&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Status&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*&, char*&>(llvm::StringRef, llvm::StringRef, char const*, char const*&, char*&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*&>(llvm::StringRef, llvm::StringRef, char const*, char const*&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString&, char*&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&, char*&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&&)
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned int const&>(llvm::StringRef, llvm::StringRef, char const*, unsigned int const&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::AllocatedBlock*, unsigned int&, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::AllocatedBlock*&&, unsigned int&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::AllocatedBlock*, unsigned int&, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::AllocatedBlock*&&, unsigned int&, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::AllocatedBlock*, unsigned long long&, bool&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::AllocatedBlock*&&, unsigned long long&, bool&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::FileSpec const&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::FileSpec const&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Target*>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Target*&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned int&, unsigned int&>(llvm::StringRef, llvm::StringRef, char const*, unsigned int&, unsigned int&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&, lldb::StateType&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&, lldb::StateType&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&, char const*>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&, char const*&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::FileSpec const, llvm::StringRef>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::FileSpec const&&, llvm::StringRef&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Timeout<std::__1::ratio<1l, 1000000l> >&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> >&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::StringRef, lldb_private::ConstString const&>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&&, lldb_private::ConstString const&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Section*, lldb_private::FileSpec const&, lldb_private::ConstString, unsigned long long&, lldb_private::Module*>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Section*&&, lldb_private::FileSpec const&, lldb_private::ConstString&&, unsigned long long&, lldb_private::Module*&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString, lldb_private::ConstString, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&&, lldb_private::ConstString&&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<void*>(llvm::StringRef, llvm::StringRef, char const*, void*&&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, char const*>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, char const*&&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Unexecuted instantiation: void lldb_private::Log::Format<bool, char const*, bool const&>(llvm::StringRef, llvm::StringRef, char const*, bool&&, char const*&&, bool const&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::FileSpec&, lldb_private::FileSpec&, lldb_private::FileSpec&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::FileSpec&, lldb_private::FileSpec&, lldb_private::FileSpec&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, lldb_private::Vote const&, lldb_private::Vote&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, lldb_private::Vote const&, lldb_private::Vote&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Vote&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Vote&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::StringRef&, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&, llvm::Optional<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::StringRef&, llvm::StringRef&>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&, llvm::StringRef&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::FileSpec&, unsigned int&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::FileSpec&, unsigned int&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, lldb_private::ConstString>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, lldb_private::ConstString&&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::StringRef&, llvm::SmallString<128u>&>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&, llvm::SmallString<128u>&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::StringRef&, unsigned int&, unsigned int&>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&, unsigned int&, unsigned int&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*&, char const*&, unsigned long long&, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, char const*&, char const*&, unsigned long long&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*&, char const*&, unsigned long long&, unsigned long long&, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, char const*&, char const*&, unsigned long long&, unsigned long long&, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, int>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, int&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, unsigned long&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, unsigned long&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, clang::Decl*&, char const*, clang::Decl*&>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, clang::Decl*&, char const*&&, clang::Decl*&)
void lldb_private::Log::Format<lldb_private::ConstString, void*, clang::ASTContext*, clang::ASTContext*>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&&, void*&&, clang::ASTContext*&&, clang::ASTContext*&&)
Line
Count
Source
141
15
              const char *format, Args &&... args) {
142
15
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
15
  }
Unexecuted instantiation: void lldb_private::Log::Format<char const*, clang::Decl*&, clang::ASTContext*&, clang::ASTContext*&>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, clang::Decl*&, clang::ASTContext*&, clang::ASTContext*&)
void lldb_private::Log::Format<clang::ASTContext*&>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&)
Line
Count
Source
141
27
              const char *format, Args &&... args) {
142
27
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
27
  }
void lldb_private::Log::Format<clang::ASTContext*&, clang::ASTContext*&>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&, clang::ASTContext*&)
Line
Count
Source
141
27
              const char *format, Args &&... args) {
142
27
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
27
  }
void lldb_private::Log::Format<void*, char const*, void*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, void*>(llvm::StringRef, llvm::StringRef, char const*, void*&&, char const*&&, void*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, void*&&)
Line
Count
Source
141
6
              const char *format, Args &&... args) {
142
6
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
6
  }
Unexecuted instantiation: void lldb_private::Log::Format<char const*, clang::Decl*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, clang::Decl*&, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, clang::Decl*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, clang::Decl*&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, clang::Decl*&, clang::Decl*&, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, clang::Decl*&, clang::Decl*&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::Decl*&, clang::ASTContext*&, clang::ASTContext*, clang::ASTContext*>(llvm::StringRef, llvm::StringRef, char const*, clang::Decl*&, clang::ASTContext*&, clang::ASTContext*&&, clang::ASTContext*&&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ASTContext*>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::Decl*&, clang::ASTContext*&, clang::ASTContext*>(llvm::StringRef, llvm::StringRef, char const*, clang::Decl*&, clang::ASTContext*&, clang::ASTContext*&&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, char const*, char const*, char const*>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, char const*&&, char const*&&, char const*&&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, char const*, char const*>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, char const*&&, char const*&&)
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::vector<std::__1::pair<std::__1::shared_ptr<lldb_private::Module>, lldb_private::CompilerDeclContext>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<lldb_private::Module>, lldb_private::CompilerDeclContext> > >*, unsigned long>(llvm::StringRef, llvm::StringRef, char const*, std::__1::vector<std::__1::pair<std::__1::shared_ptr<lldb_private::Module>, lldb_private::CompilerDeclContext>, std::__1::allocator<std::__1::pair<std::__1::shared_ptr<lldb_private::Module>, lldb_private::CompilerDeclContext> > >*&&, unsigned long&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString, lldb_private::ConstString>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&&, lldb_private::ConstString&&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::StringRef, clang::TagDecl*&, llvm::StringRef>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&&, clang::TagDecl*&, llvm::StringRef&&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ASTContext*&, llvm::StringRef, llvm::StringRef>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&, llvm::StringRef&&, llvm::StringRef&&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ASTContext*&, llvm::StringRef, char const*, char const*, void const*>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&, llvm::StringRef&&, char const*&&, char const*&&, void const*&&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ASTContext*&, llvm::StringRef, char const*, void const*>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&, llvm::StringRef&&, char const*&&, void const*&&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ASTContext*&, llvm::StringRef>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&, llvm::StringRef&&)
Unexecuted instantiation: void lldb_private::Log::Format<void*, void*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, void*&&, void*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, llvm::StringRef&&, char const*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ASTContext*&, llvm::StringRef, lldb_private::ConstString const&>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&, llvm::StringRef&&, lldb_private::ConstString const&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ASTContext*&, llvm::StringRef, lldb_private::ConstString const&, llvm::StringRef>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&, llvm::StringRef&&, lldb_private::ConstString const&, llvm::StringRef&&)
void lldb_private::Log::Format<clang::ASTContext*&, llvm::StringRef, lldb_private::ConstString const&, char const*>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&, llvm::StringRef&&, lldb_private::ConstString const&, char const*&&)
Line
Count
Source
141
60
              const char *format, Args &&... args) {
142
60
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
60
  }
void lldb_private::Log::Format<lldb_private::ConstString const&, char const*>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString const&, char const*&&)
Line
Count
Source
141
60
              const char *format, Args &&... args) {
142
60
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
60
  }
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString const&, lldb_private::ConstString>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString const&, lldb_private::ConstString&&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, char const*&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ASTContext*&, llvm::StringRef, llvm::StringRef, lldb_private::ConstString&>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&, llvm::StringRef&&, llvm::StringRef&&, lldb_private::ConstString&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ObjCInterfaceDecl*&, clang::ASTContext*>(llvm::StringRef, llvm::StringRef, char const*, clang::ObjCInterfaceDecl*&, clang::ASTContext*&&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ASTContext*&, llvm::StringRef, llvm::StringRef, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&, llvm::StringRef&&, llvm::StringRef&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ObjCInterfaceDecl const*&, clang::ASTContext*>(llvm::StringRef, llvm::StringRef, char const*, clang::ObjCInterfaceDecl const*&, clang::ASTContext*&&)
void lldb_private::Log::Format<clang::ASTContext*&, llvm::StringRef, clang::RecordDecl const*&, llvm::StringRef>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext*&, llvm::StringRef&&, clang::RecordDecl const*&, llvm::StringRef&&)
Line
Count
Source
141
54
              const char *format, Args &&... args) {
142
54
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
54
  }
Unexecuted instantiation: void lldb_private::Log::Format<void const*>(llvm::StringRef, llvm::StringRef, char const*, void const*&&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::FieldDecl*, llvm::StringRef, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, clang::FieldDecl*&&, llvm::StringRef&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, clang::CXXRecordDecl*&, llvm::StringRef, long long>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, clang::CXXRecordDecl*&, llvm::StringRef&&, long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ASTContext* const&, llvm::StringRef, lldb_private::ConstString&, lldb_private::ConstString>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext* const&, llvm::StringRef&&, lldb_private::ConstString&, lldb_private::ConstString&&)
Unexecuted instantiation: void lldb_private::Log::Format<clang::ASTContext* const&, llvm::StringRef, lldb_private::ConstString&>(llvm::StringRef, llvm::StringRef, char const*, clang::ASTContext* const&, llvm::StringRef&&, lldb_private::ConstString&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString&, lldb_private::ConstString>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&, lldb_private::ConstString&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned short&>(llvm::StringRef, llvm::StringRef, char const*, unsigned short&)
void lldb_private::Log::Format<clang::NamedDecl const*&, lldb_private::ConstString&, lldb_private::ConstString>(llvm::StringRef, llvm::StringRef, char const*, clang::NamedDecl const*&, lldb_private::ConstString&, lldb_private::ConstString&&)
Line
Count
Source
141
36
              const char *format, Args &&... args) {
142
36
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
36
  }
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString const&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString const&)
void lldb_private::Log::Format<lldb_private::ConstString const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Line
Count
Source
141
15
              const char *format, Args &&... args) {
142
15
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
15
  }
Unexecuted instantiation: void lldb_private::Log::Format<char const* const&>(llvm::StringRef, llvm::StringRef, char const*, char const* const&)
void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Line
Count
Source
141
36
              const char *format, Args &&... args) {
142
36
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
36
  }
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Line
Count
Source
141
15
              const char *format, Args &&... args) {
142
15
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
15
  }
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, char const*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&&, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, char const*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, char const*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::StringRef, char const*>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&&, char const*&&)
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
void lldb_private::Log::Format<llvm::iterator_range<std::__1::__wrap_iter<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*> > >(llvm::StringRef, llvm::StringRef, char const*, llvm::iterator_range<std::__1::__wrap_iter<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >*> >&&)
Line
Count
Source
141
6
              const char *format, Args &&... args) {
142
6
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
6
  }
void lldb_private::Log::Format<lldb_private::ConstString&, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&, unsigned long long&&)
Line
Count
Source
141
15
              const char *format, Args &&... args) {
142
15
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
15
  }
Unexecuted instantiation: void lldb_private::Log::Format<llvm::StringRef&, llvm::StringRef>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&, llvm::StringRef&&)
void lldb_private::Log::Format<llvm::StringRef&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned long long&, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, unsigned long long&, unsigned long long&)
Line
Count
Source
141
42
              const char *format, Args &&... args) {
142
42
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
42
  }
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString&, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::StringRef&, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&, unsigned long long&&)
void lldb_private::Log::Format<llvm::StringRef&, void*>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&, void*&&)
Line
Count
Source
141
282
              const char *format, Args &&... args) {
142
282
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
282
  }
void lldb_private::Log::Format<lldb_private::ConstString&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, unsigned long long&)
Line
Count
Source
141
36
              const char *format, Args &&... args) {
142
36
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
36
  }
void lldb_private::Log::Format<long long, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, long long&&, unsigned long long&&)
Line
Count
Source
141
15
              const char *format, Args &&... args) {
142
15
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
15
  }
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long const&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long const&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*, unsigned long long&, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, char const*&&, unsigned long long&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::StringRef, llvm::StringRef>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&&, llvm::StringRef&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::ConstString, unsigned int&, unsigned int&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::ConstString&&, unsigned int&, unsigned int&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString, llvm::StringRef&, lldb_private::ConstString, unsigned int&, unsigned int&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&&, llvm::StringRef&, lldb_private::ConstString&&, unsigned int&, unsigned int&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Status&, short&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Status&, short&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Status&, int&, int&, unsigned long&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Status&, int&, int&, unsigned long&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Status&, int&, unsigned long&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Status&, int&, unsigned long&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Status&, void**&, int>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Status&, void**&, int&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Status&, void**&, int, int>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Status&, void**&, int&&, int&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Status&, void**&, int, llvm::StringRef, int&, unsigned short&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Status&, void**&, int&&, llvm::StringRef&&, int&, unsigned short&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Status&, int&, char const*&, void**, void**, char* const*&, char* const*>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Status&, int&, char const*&, void**&&, void**&&, char* const*&, char* const*&&)
Unexecuted instantiation: void lldb_private::Log::Format<int&, char* const&>(llvm::StringRef, llvm::StringRef, char const*, int&, char* const&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Status&, int&, char const*&, void**, char* const*&, char* const*>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Status&, int&, char const*&, void**&&, char* const*&, char* const*&&)
Unexecuted instantiation: void lldb_private::Log::Format<void*, lldb_private::ConstString>(llvm::StringRef, llvm::StringRef, char const*, void*&&, lldb_private::ConstString&&)
Unexecuted instantiation: void lldb_private::Log::Format<void*, char const*, char const*, void*>(llvm::StringRef, llvm::StringRef, char const*, void*&&, char const*&&, char const*&&, void*&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Listener*, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Listener*&&, lldb_private::Timeout<std::__1::ratio<1l, 1000000l> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long const&, unsigned long long const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long const&, unsigned long long const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, unsigned long long const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long const&, unsigned long long const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >(llvm::StringRef, llvm::StringRef, char const*, unsigned long long const&, unsigned long long const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&)
Unexecuted instantiation: void lldb_private::Log::Format<int&, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, int&, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, unsigned long&&, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, unsigned int&, int&, unsigned int&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, unsigned int&, int&, unsigned int&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, char const*, unsigned int&, int&, unsigned int&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, char const*&&, unsigned int&, int&, unsigned int&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, unsigned int&, unsigned int&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, unsigned int&, unsigned int&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, int&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, int&)
Unexecuted instantiation: void lldb_private::Log::Format<ObjectFilePECOFF*, lldb_private::Module*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, llvm::object::COFFObjectFile*>(llvm::StringRef, llvm::StringRef, char const*, ObjectFilePECOFF*&&, lldb_private::Module*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, llvm::object::COFFObjectFile*&&)
Unexecuted instantiation: void lldb_private::Log::Format<bool&, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const>(llvm::StringRef, llvm::StringRef, char const*, bool&, char const*&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&&)
Unexecuted instantiation: void lldb_private::Log::Format<bool&>(llvm::StringRef, llvm::StringRef, char const*, bool&)
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::ConstString&>(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::ConstString&)
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::ConstString&, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::ConstString&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::ConstString&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::Status&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::ConstString&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, lldb_private::Status&)
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<char const*&, lldb_private::FileSpec&>(llvm::StringRef, llvm::StringRef, char const*, char const*&, lldb_private::FileSpec&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::FileSpec const&, lldb_private::FileSpec&>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::FileSpec const&, lldb_private::FileSpec&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::iterator_range<char const* const*>, llvm::iterator_range<char const* const*> >(llvm::StringRef, llvm::StringRef, char const*, llvm::iterator_range<char const* const*>&&, llvm::iterator_range<char const* const*>&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned int&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, lldb_private::Status&, unsigned long&>(llvm::StringRef, llvm::StringRef, char const*, unsigned int&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&&, lldb_private::Status&, unsigned long&)
Unexecuted instantiation: void lldb_private::Log::Format<ThreadKDP*, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, ThreadKDP*&&, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::Thread*, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::Thread*&&, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long&, unsigned long long&, unsigned long, lldb_private::Status&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&, unsigned long long&, unsigned long&&, lldb_private::Status&)
Unexecuted instantiation: void lldb_private::Log::Format<lldb_private::process_gdb_remote::ThreadGDBRemote*, unsigned long long, unsigned long long>(llvm::StringRef, llvm::StringRef, char const*, lldb_private::process_gdb_remote::ThreadGDBRemote*&&, unsigned long long&&, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::Format<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, unsigned long long const&, unsigned long long, unsigned long long const&>(llvm::StringRef, llvm::StringRef, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, unsigned long long const&, unsigned long long&&, unsigned long long const&)
Unexecuted instantiation: void lldb_private::Log::Format<llvm::StringRef&, unsigned long long&>(llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&, unsigned long long&)
Unexecuted instantiation: void lldb_private::Log::Format<unsigned long long, lldb::StateType const&>(llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, lldb::StateType const&)
void lldb_private::Log::Format<char const (&) [9], llvm::StringRef&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&>(llvm::StringRef, llvm::StringRef, char const*, char const (&) [9], llvm::StringRef&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)
Line
Count
Source
141
35
              const char *format, Args &&... args) {
142
35
    Format(file, function, llvm::formatv(format, std::forward<Args>(args)...));
143
35
  }
144
145
  template <typename... Args>
146
  void FormatError(llvm::Error error, llvm::StringRef file,
147
                   llvm::StringRef function, const char *format,
148
1
                   Args &&... args) {
149
1
    Format(file, function,
150
1
           llvm::formatv(format, llvm::toString(std::move(error)),
151
1
                         std::forward<Args>(args)...));
152
1
  }
void lldb_private::Log::FormatError<>(llvm::Error, llvm::StringRef, llvm::StringRef, char const*)
Line
Count
Source
148
1
                   Args &&... args) {
149
1
    Format(file, function,
150
1
           llvm::formatv(format, llvm::toString(std::move(error)),
151
1
                         std::forward<Args>(args)...));
152
1
  }
Unexecuted instantiation: void lldb_private::Log::FormatError<unsigned long long>(llvm::Error, llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&)
Unexecuted instantiation: void lldb_private::Log::FormatError<char const*&>(llvm::Error, llvm::StringRef, llvm::StringRef, char const*, char const*&)
Unexecuted instantiation: void lldb_private::Log::FormatError<char const*>(llvm::Error, llvm::StringRef, llvm::StringRef, char const*, char const*&&)
Unexecuted instantiation: void lldb_private::Log::FormatError<llvm::StringRef>(llvm::Error, llvm::StringRef, llvm::StringRef, char const*, llvm::StringRef&&)
Unexecuted instantiation: void lldb_private::Log::FormatError<unsigned long long, llvm::StringRef&>(llvm::Error, llvm::StringRef, llvm::StringRef, char const*, unsigned long long&&, llvm::StringRef&)
Unexecuted instantiation: void lldb_private::Log::FormatError<unsigned long long const&>(llvm::Error, llvm::StringRef, llvm::StringRef, char const*, unsigned long long const&)
Unexecuted instantiation: void lldb_private::Log::FormatError<lldb_private::FileSpec const&>(llvm::Error, llvm::StringRef, llvm::StringRef, char const*, lldb_private::FileSpec const&)
Unexecuted instantiation: void lldb_private::Log::FormatError<lldb_private::FileSpec&>(llvm::Error, llvm::StringRef, llvm::StringRef, char const*, lldb_private::FileSpec&)
153
154
  /// Prefer using LLDB_LOGF whenever possible.
155
  void Printf(const char *format, ...) __attribute__((format(printf, 2, 3)));
156
157
  void Error(const char *fmt, ...) __attribute__((format(printf, 2, 3)));
158
159
  void Verbose(const char *fmt, ...) __attribute__((format(printf, 2, 3)));
160
161
  void Warning(const char *fmt, ...) __attribute__((format(printf, 2, 3)));
162
163
  const Flags GetOptions() const;
164
165
  const Flags GetMask() const;
166
167
  bool GetVerbose() const;
168
169
  void VAPrintf(const char *format, va_list args);
170
  void VAError(const char *format, va_list args);
171
172
private:
173
  Channel &m_channel;
174
175
  // The mutex makes sure enable/disable operations are thread-safe. The
176
  // options and mask variables are atomic to enable their reading in
177
  // Channel::GetLogIfAny without taking the mutex to speed up the fast path.
178
  // Their modification however, is still protected by this mutex.
179
  llvm::sys::RWMutex m_mutex;
180
181
  std::shared_ptr<llvm::raw_ostream> m_stream_sp;
182
  std::atomic<uint32_t> m_options{0};
183
  std::atomic<uint32_t> m_mask{0};
184
185
  void WriteHeader(llvm::raw_ostream &OS, llvm::StringRef file,
186
                   llvm::StringRef function);
187
  void WriteMessage(const std::string &message);
188
189
  void Format(llvm::StringRef file, llvm::StringRef function,
190
              const llvm::formatv_object_base &payload);
191
192
23.0k
  std::shared_ptr<llvm::raw_ostream> GetStream() {
193
23.0k
    llvm::sys::ScopedReader lock(m_mutex);
194
23.0k
    return m_stream_sp;
195
23.0k
  }
196
197
  void Enable(const std::shared_ptr<llvm::raw_ostream> &stream_sp,
198
              uint32_t options, uint32_t flags);
199
200
  void Disable(uint32_t flags);
201
202
  typedef llvm::StringMap<Log> ChannelMap;
203
  static llvm::ManagedStatic<ChannelMap> g_channel_map;
204
205
  static void ForEachCategory(
206
      const Log::ChannelMap::value_type &entry,
207
      llvm::function_ref<void(llvm::StringRef, llvm::StringRef)> lambda);
208
209
  static void ListCategories(llvm::raw_ostream &stream,
210
                             const ChannelMap::value_type &entry);
211
  static uint32_t GetFlags(llvm::raw_ostream &stream, const ChannelMap::value_type &entry,
212
                           llvm::ArrayRef<const char *> categories);
213
214
  Log(const Log &) = delete;
215
  void operator=(const Log &) = delete;
216
};
217
218
} // namespace lldb_private
219
220
/// The LLDB_LOG* macros defined below are the way to emit log messages.
221
///
222
/// Note that the macros surround the arguments in a check for the log
223
/// being on, so you can freely call methods in arguments without affecting
224
/// the non-log execution flow.
225
///
226
/// If you need to do more complex computations to prepare the log message
227
/// be sure to add your own if (log) check, since we don't want logging to
228
/// have any effect when not on.
229
///
230
/// However, the LLDB_LOG macro uses the llvm::formatv system (see the
231
/// ProgrammersManual page in the llvm docs for more details).  This allows
232
/// the use of "format_providers" to auto-format datatypes, and there are
233
/// already formatters for some of the llvm and lldb datatypes.
234
///
235
/// So if you need to do non-trivial formatting of one of these types, be
236
/// sure to grep the lldb and llvm sources for "format_provider" to see if
237
/// there is already a formatter before doing in situ formatting, and if
238
/// possible add a provider if one does not already exist.
239
240
#define LLDB_LOG(log, ...)                                                     \
241
9.76M
  do {                                                                         \
242
9.76M
    ::lldb_private::Log *log_private = (log);                                  \
243
9.76M
    if (log_private)                                                           \
244
9.76M
      
log_private->Format(__FILE__, __func__, 4.22k
__VA_ARGS__70
); \
245
9.76M
  } while (0)
246
247
#define LLDB_LOGF(log, ...)                                                    \
248
5.02M
  do {                                                                         \
249
5.02M
    ::lldb_private::Log *log_private = (log);                                  \
250
5.02M
    if (log_private)                                                           \
251
5.02M
      
log_private->Printf(9.87k
__VA_ARGS__256
); \
252
5.02M
  } while (0)
253
254
#define LLDB_LOGV(log, ...)                                                    \
255
1.49M
  do {                                                                         \
256
1.49M
    ::lldb_private::Log *log_private = (log);                                  \
257
1.49M
    if (log_private && 
log_private->GetVerbose()3.68k
) \
258
1.49M
      
log_private->Format(__FILE__, __func__, 0
__VA_ARGS__0
); \
259
1.49M
  } while (0)
260
261
// Write message to log, if error is set. In the log message refer to the error
262
// with {0}. Error is cleared regardless of whether logging is enabled.
263
#define LLDB_LOG_ERROR(log, error, ...)                                        \
264
5.51k
  do {                                                                         \
265
5.51k
    ::lldb_private::Log *log_private = (log);                                  \
266
5.51k
    ::llvm::Error error_private = (
error0
); \
267
5.51k
    if (log_private && 
error_private0
) { \
268
0
      log_private->FormatError(::std::move(error_private), __FILE__, __func__, \
269
0
                               __VA_ARGS__);                                   \
270
0
    } else                                                                     \
271
5.51k
      ::llvm::consumeError(::std::move(error_private));                        \
272
5.51k
  } while (0)
273
274
#endif // LLDB_UTILITY_LOG_H