Work around a Clang modules build issue.
authorAdrian Prantl <aprantl@apple.com>
Mon, 31 Jan 2022 19:57:18 +0000 (11:57 -0800)
committerAdrian Prantl <aprantl@apple.com>
Mon, 31 Jan 2022 20:03:00 +0000 (12:03 -0800)
See:
https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/40636/consoleFull#-39956214149ba4694-19c4-4d7e-bec5-911270d8a58c

```
llvm/lib/Support/Valgrind.cpp:37:63: error: missing '#include <stddef.h>'; 'size_t' must be declared before it is used
void llvm::sys::ValgrindDiscardTranslations(const void *Addr, size_t Len) {
                                                              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/stddef.h:46:23: note: declaration here is not visible
typedef __SIZE_TYPE__ size_t;
                      ^
1 error generated.
```

rdar://88049280

llvm/lib/Support/Valgrind.cpp

index 3cf41fa..5994656 100644 (file)
@@ -12,9 +12,9 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include <stddef.h>
 #include "llvm/Support/Valgrind.h"
 #include "llvm/Config/config.h"
-#include <cstddef>
 
 #if HAVE_VALGRIND_VALGRIND_H
 #include <valgrind/valgrind.h>