@@ -34,24 +34,6 @@ int CONDITIONAL_ASSERT_Global_enable_flag =
34
34
1 ; // Default to `on` in debug builds
35
35
#endif
36
36
37
- static void ASSERT_help () {
38
- static int ASSERT_help_shown = 0 ;
39
- if (ASSERT_help_shown) {
40
- return ;
41
- }
42
- ASSERT_help_shown = 1 ;
43
-
44
- if (!AssertHelp) {
45
- llvm::errs () << " (to display assertion configuration options: -Xllvm -assert-help)\n " ;
46
- return ;
47
- }
48
-
49
- llvm::errs () << " \n " ;
50
- llvm::errs () << " Control assertion behavior with one or more of the following options:\n\n " ;
51
- llvm::errs () << " -Xllvm -assert-continue\n " ;
52
- llvm::errs () << " Continue after any failed assertion\n\n " ;
53
- }
54
-
55
37
void ASSERT_failure (const char *expr, const char *filename, int line, const char *func) {
56
38
// Find the last component of `filename`
57
39
// Needed on Windows MSVC, which lacks __FILE_NAME__
@@ -80,6 +62,24 @@ void ASSERT_failure(const char *expr, const char *filename, int line, const char
80
62
abort ();
81
63
}
82
64
65
+ void ASSERT_help () {
66
+ static int ASSERT_help_shown = 0 ;
67
+ if (ASSERT_help_shown) {
68
+ return ;
69
+ }
70
+ ASSERT_help_shown = 1 ;
71
+
72
+ if (!AssertHelp) {
73
+ llvm::errs () << " (to display assertion configuration options: -Xllvm -assert-help)\n " ;
74
+ return ;
75
+ }
76
+
77
+ llvm::errs () << " \n " ;
78
+ llvm::errs () << " Control assertion behavior with one or more of the following options:\n\n " ;
79
+ llvm::errs () << " -Xllvm -assert-continue\n " ;
80
+ llvm::errs () << " Continue after any failed assertion\n\n " ;
81
+ }
82
+
83
83
// This has to be callable in the same way as the macro version,
84
84
// so we can't put it inside a namespace.
85
85
#undef CONDITIONAL_ASSERT_enabled
0 commit comments