[llvm] 2afc8be - Work around a Clang modules build issue.

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 31 12:03:07 PST 2022


Author: Adrian Prantl
Date: 2022-01-31T12:03:00-08:00
New Revision: 2afc8be2faaa83c5f01432798596ebec90767fef

URL: https://github.com/llvm/llvm-project/commit/2afc8be2faaa83c5f01432798596ebec90767fef
DIFF: https://github.com/llvm/llvm-project/commit/2afc8be2faaa83c5f01432798596ebec90767fef.diff

LOG: Work around a Clang modules build issue.

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

Added: 
    

Modified: 
    llvm/lib/Support/Valgrind.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Support/Valgrind.cpp b/llvm/lib/Support/Valgrind.cpp
index 3cf41faeb55d..5994656c5c03 100644
--- a/llvm/lib/Support/Valgrind.cpp
+++ b/llvm/lib/Support/Valgrind.cpp
@@ -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>


        


More information about the llvm-commits mailing list