gdb: add back declarations for _initialize functions
[deliverable/binutils-gdb.git] / gdb / unittests / string_view-selftests.c
index 21a10e65afa007b9daf123ed6639635e5fe8a2cf..a52419bb28a51e33084971dcd719934fc7022f2e 100644 (file)
@@ -1,6 +1,6 @@
 /* Self tests for string_view for GDB, the GNU debugger.
 
-   Copyright (C) 2018-2019 Free Software Foundation, Inc.
+   Copyright (C) 2018-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,8 +24,8 @@
 #define GNULIB_NAMESPACE gnulib
 
 #include "defs.h"
-#include "common/selftest.h"
-#include "common/gdb_string_view.h"
+#include "gdbsupport/selftest.h"
+#include "gdbsupport/gdb_string_view.h"
 
 /* Used by the included .cc files below.  Included here because the
    included test files are wrapped in a namespace.  */
@@ -170,10 +170,13 @@ run_tests ()
 } /* namespace string_view */
 } /* namespace selftests */
 
+#endif /* __cplusplus < 201703L */
+
+void _initialize_string_view_selftests ();
 void
 _initialize_string_view_selftests ()
 {
+#if defined(GDB_STRING_VIEW)
   selftests::register_test ("string_view", selftests::string_view::run_tests);
+#endif
 }
-
-#endif /* __cplusplus < 201703L */
This page took 0.025683 seconds and 4 git commands to generate.