gdb/value.c: add several headers to the include list
authorChristopher Di Bella <cjdb@google.com>
Wed, 20 Jul 2022 06:01:20 +0000 (06:01 +0000)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 20 Jul 2022 14:20:07 +0000 (10:20 -0400)
Building GDB currently fails to build with libc++, because libc++ is
stricter about which headers "leak" entities they're not guaranteed
to support. The following headers have been added:

* `<iterator>`, to support `std::back_inserter`
* `<utility>`, to support `std::move` and `std::swap`
* `<vector>`, to support `std::vector`

Change-Id: Iaeb15057c5fbb43217df77ce34d4e54446dbcf3d

gdb/value.c

index 022fca91a42a8b4d5bccc745b62e642aea8a02ed..c9bec678d95758fb36448f7609c5860af8878ab2 100644 (file)
@@ -40,6 +40,9 @@
 #include "cp-abi.h"
 #include "user-regs.h"
 #include <algorithm>
+#include <iterator>
+#include <utility>
+#include <vector>
 #include "completer.h"
 #include "gdbsupport/selftest.h"
 #include "gdbsupport/array-view.h"