Author: Zibi Sarbinowski Date: 2025-09-23T14:08:20-04:00 New Revision: 55f230f74e1d8de93cac42b6f804ea5e34849e1b
URL: https://github.com/llvm/llvm-project/commit/55f230f74e1d8de93cac42b6f804ea5e34849e1b DIFF: https://github.com/llvm/llvm-project/commit/55f230f74e1d8de93cac42b6f804ea5e34849e1b.diff LOG: [z.OS] fix strnlen() usage in Context.cpp available on z/OS (#160339) On z/OS `strnlen()` is not available by default so we use the wrapper header `zOSSupport.h` to make it visible. This will fix the following error: ``` clang/lib/AST/ByteCode/Context.cpp:250:16: error: use of undeclared identifier 'strnlen' 250 | Result = strnlen(reinterpret_cast<const char *>(Ptr.getRawAddress()), N); | ^~~~~~~ 1 error generated. ``` Added: Modified: clang/lib/AST/ByteCode/Context.cpp Removed: ################################################################################ diff --git a/clang/lib/AST/ByteCode/Context.cpp b/clang/lib/AST/ByteCode/Context.cpp index 8860bcc54a9c1..71d0bcf61a5ff 100644 --- a/clang/lib/AST/ByteCode/Context.cpp +++ b/clang/lib/AST/ByteCode/Context.cpp @@ -18,6 +18,7 @@ #include "clang/AST/ASTLambda.h" #include "clang/AST/Expr.h" #include "clang/Basic/TargetInfo.h" +#include "llvm/Support/SystemZ/zOSSupport.h" using namespace clang; using namespace clang::interp; _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
