• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:message +full:- +full:format

7 //     http://www.apache.org/licenses/LICENSE-2.0
23 #include "spirv-tools/libspirv.hpp"
25 // Asserts the given condition is true. Otherwise, sends a message to the
29 // SPIRV_ASSERT(<message-consumer>, <condition-expression>);
30 // SPIRV_ASSERT(<message-consumer>, <condition-expression>, <message>);
31 // SPIRV_ASSERT(<message-consumer>, <condition-expression>,
32 // <message-format>, <variable-arguments>);
34 // In the third format, the number of <variable-arguments> cannot exceed (5 -
44 // Logs a debug message to the consumer. Accepts the following formats:
46 // SPIRV_DEBUG(<message-consumer>, <message>);
47 // SPIRV_DEBUG(<message-consumer>, <message-format>, <variable-arguments>);
49 // In the second format, the number of <variable-arguments> cannot exceed (5 -
68 // Calls the given |consumer| by supplying the |message|. The |message| is from
72 const char* message) { in Log() argument
73 if (consumer != nullptr) consumer(level, source, position, message); in Log()
76 // Calls the given |consumer| by supplying the message composed according to the
77 // given |format|. The |message| is from the given |source| and |location| and
82 const char* format, Args&&... args) { in Logf() argument
90 char message[kInitBufferSize]; in Logf() local
92 snprintf(message, kInitBufferSize, format, std::forward<Args>(args)...); in Logf()
95 Log(consumer, level, source, position, message); in Logf()
104 snprintf(longer_message.data(), longer_message.size(), format, in Logf()
110 Log(consumer, level, source, position, "cannot compose log message"); in Logf()
117 // Calls the given |consumer| by supplying the given error |message|. The
118 // |message| is from the given |source| and |location|.
120 const spv_position_t& position, const char* message) { in Error() argument
121 Log(consumer, SPV_MSG_ERROR, source, position, message); in Error()
124 // Calls the given |consumer| by supplying the error message composed according
125 // to the given |format|. The |message| is from the given |source| and
129 const spv_position_t& position, const char* format, in Errorf() argument
131 Logf(consumer, SPV_MSG_ERROR, source, position, format, in Errorf()
155 #define SPIRV_ASSERT_2(consumer, condition, message) \ argument
160 "assertion failed: " message); \
165 #define SPIRV_ASSERT_more(consumer, condition, format, ...) \ argument
170 "assertion failed: " format, __VA_ARGS__); \
175 #define SPIRV_ASSERT_3(consumer, condition, format, ...) \ argument
176 SPIRV_ASSERT_more(consumer, condition, format, __VA_ARGS__)
178 #define SPIRV_ASSERT_4(consumer, condition, format, ...) \ argument
179 SPIRV_ASSERT_more(consumer, condition, format, __VA_ARGS__)
181 #define SPIRV_ASSERT_5(consumer, condition, format, ...) \ argument
182 SPIRV_ASSERT_more(consumer, condition, format, __VA_ARGS__)
184 #define SPIRV_DEBUG_1(consumer, message) \ argument
187 {static_cast<size_t>(__LINE__), 0, 0}, message); \
190 #define SPIRV_DEBUG_more(consumer, format, ...) \ argument
193 {static_cast<size_t>(__LINE__), 0, 0}, format, \
197 #define SPIRV_DEBUG_2(consumer, format, ...) \ argument
198 SPIRV_DEBUG_more(consumer, format, __VA_ARGS__)
200 #define SPIRV_DEBUG_3(consumer, format, ...) \ argument
201 SPIRV_DEBUG_more(consumer, format, __VA_ARGS__)
203 #define SPIRV_DEBUG_4(consumer, format, ...) \ argument
204 SPIRV_DEBUG_more(consumer, format, __VA_ARGS__)
206 #define SPIRV_DEBUG_5(consumer, format, ...) \ argument
207 SPIRV_DEBUG_more(consumer, format, __VA_ARGS__)