Skip to content

Commit 94439b2

Browse files
committed
iwyu: Fix new errors happening in build-llvm job
1 parent 9a8748f commit 94439b2

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

include/mp/util.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77

88
#include <capnp/schema.h>
99
#include <cassert>
10-
#include <cstddef>
10+
#include <cstdlib>
1111
#include <cstring>
1212
#include <functional>
1313
#include <kj/string-tree.h>
1414
#include <mutex>
1515
#include <string>
1616
#include <tuple>
17+
#include <typeinfo>
1718
#include <type_traits>
1819
#include <utility>
1920
#include <variant>

src/mp/gen.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,11 @@ static void Generate(kj::StringPtr src_prefix,
238238
cpp_types << "// Generated by " PROXY_BIN " from " << src_file << "\n\n";
239239
cpp_types << "// IWYU pragma: no_include \"mp/proxy.h\"\n";
240240
cpp_types << "// IWYU pragma: no_include \"mp/proxy-io.h\"\n";
241+
cpp_types << "#include <" << include_path << ".h> // IWYU pragma: keep\n";
241242
cpp_types << "#include <" << include_path << ".proxy.h>\n";
242243
cpp_types << "#include <" << include_path << ".proxy-types.h> // IWYU pragma: keep\n";
244+
cpp_types << "#include <kj/common.h>\n";
245+
cpp_types << "#include <mp/util.h>\n";
243246
cpp_types << "#include <" << PROXY_TYPES << ">\n\n";
244247
cpp_types << "namespace mp {\n";
245248

src/mp/proxy.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
#include <atomic>
1414
#include <capnp/capability.h>
15+
#include <capnp/common.h> // IWYU pragma: keep
1516
#include <capnp/rpc.h>
1617
#include <condition_variable>
1718
#include <functional>

src/mp/util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#include <mp/config.h>
5+
#include <mp/config.h> // IWYU pragma: keep
66
#include <mp/util.h>
77

88
#include <cerrno>
99
#include <cstdio>
1010
#include <kj/common.h>
1111
#include <kj/string-tree.h>
12-
#include <pthread.h>
12+
#include <pthread.h> // IWYU pragma: keep
1313
#include <sstream>
1414
#include <string>
1515
#include <sys/resource.h>

0 commit comments

Comments
 (0)