Skip to content

Commit f6212c1

Browse files
authored
[llvm] Fix missing includes (#128000)
Compilation with `LLVM_ENABLE_MODULES:BOOL=ON` fails due to missing includes. This patch adds these includes (+missing tuple include in thread.h), fixing the module build for me.
1 parent 55fdecc commit f6212c1

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

llvm/include/llvm/CodeGen/ByteProvider.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#ifndef LLVM_CODEGEN_BYTEPROVIDER_H
1818
#define LLVM_CODEGEN_BYTEPROVIDER_H
1919

20+
#include "llvm/Support/DataTypes.h"
2021
#include <optional>
2122
#include <type_traits>
2223

llvm/include/llvm/ProfileData/Coverage/MCDCTypes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef LLVM_PROFILEDATA_COVERAGE_MCDCTYPES_H
1414
#define LLVM_PROFILEDATA_COVERAGE_MCDCTYPES_H
1515

16+
#include "llvm/Support/DataTypes.h"
1617
#include <array>
1718
#include <cassert>
1819
#include <type_traits>

llvm/include/llvm/Support/thread.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
#include "llvm/Config/llvm-config.h"
2020
#include <optional>
21+
#include <tuple>
22+
#include <utility>
2123

2224
#ifdef _WIN32
2325
typedef unsigned long DWORD;
@@ -202,8 +204,8 @@ class thread {
202204
};
203205

204206
namespace this_thread {
205-
inline thread::id get_id() { return std::this_thread::get_id(); }
206-
}
207+
inline thread::id get_id() { return std::this_thread::get_id(); }
208+
} // namespace this_thread
207209

208210
#endif // LLVM_ON_UNIX || _WIN32
209211

0 commit comments

Comments
 (0)