| Flutter Impeller |

config.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_IMPELLER_BASE_CONFIG_H_
6 #define FLUTTER_IMPELLER_BASE_CONFIG_H_
7
8 #include <cstdlib>
9
10 #include "flutter/fml/logging.h"
11
12 #if defined(__GNUC__) || defined(__clang__)
13 #define IMPELLER_COMPILER_CLANG 1
14 #else // defined(__GNUC__) || defined(__clang__)
15 #define IMPELLER_COMPILER_CLANG 0
16 #endif // defined(__GNUC__) || defined(__clang__)
17
18 #if IMPELLER_COMPILER_CLANG
19 #define IMPELLER_PRINTF_FORMAT(format_number, args_number) \
20 __attribute__((format(printf, format_number, args_number)))
21 #else // IMPELLER_COMPILER_CLANG
22 #define IMPELLER_PRINTF_FORMAT(format_number, args_number)
23 #endif // IMPELLER_COMPILER_CLANG
24
25 #define IMPELLER_UNIMPLEMENTED \
26 impeller::ImpellerUnimplemented(__FUNCTION__, __FILE__, __LINE__);
27
28 namespace impeller {
29
30 [[noreturn]] inline void ImpellerUnimplemented(const char* method,
31 const char* file,
32 int line) {
33 FML_CHECK(false) << "Unimplemented: " << method << " in " << file << ":"
34 << line;
35 std::abort();
36 }
37
38 } // namespace impeller
39
40 #endif // FLUTTER_IMPELLER_BASE_CONFIG_H_
impeller::ImpellerUnimplemented
void ImpellerUnimplemented(const char *method, const char *file, int line)
Definition: config.h:30
impeller
Definition: aiks_context.cc:10