Skip to content

Commit b2a0723

Browse files
committed
rebase
Created using spr 1.3.4
2 parents a456d22 + a4394d9 commit b2a0723

File tree

21 files changed

+321
-123
lines changed

21 files changed

+321
-123
lines changed

clang/lib/CodeGen/BackendUtil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ void EmitAssemblyHelper::RunOptimizationPipeline(
10271027
if (LangOpts.Sanitize.has(SanitizerKind::LocalBounds))
10281028
PB.registerScalarOptimizerLateEPCallback([this](FunctionPassManager &FPM,
10291029
OptimizationLevel Level) {
1030-
BoundsCheckingPass::BoundsCheckingOptions Options;
1030+
BoundsCheckingPass::Options Options;
10311031
Options.Merge =
10321032
CodeGenOpts.SanitizeMergeHandlers.has(SanitizerKind::LocalBounds);
10331033
if (!CodeGenOpts.SanitizeTrap.has(SanitizerKind::LocalBounds)) {

clang/test/CodeGen/allow-ubsan-check.c

Lines changed: 106 additions & 106 deletions
Large diffs are not rendered by default.

libc/config/linux/aarch64/entrypoints.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ set(TARGET_LIBC_ENTRYPOINTS
350350

351351
# wchar.h entrypoints
352352
libc.src.wchar.wctob
353+
354+
# sys/uio.h entrypoints
355+
libc.src.sys.uio.writev
353356
)
354357

355358
if(LLVM_LIBC_INCLUDE_SCUDO)

libc/config/linux/x86_64/entrypoints.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ set(TARGET_LIBC_ENTRYPOINTS
350350
# wchar.h entrypoints
351351
libc.src.wchar.wctob
352352
libc.src.wchar.btowc
353+
354+
# sys/uio.h entrypoints
355+
libc.src.sys.uio.writev
353356
)
354357

355358
if(LLVM_LIBC_INCLUDE_SCUDO)

libc/hdr/types/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,3 +333,12 @@ add_proxy_header_library(
333333
FULL_BUILD_DEPENDS
334334
libc.include.llvm-libc-types.uid_t
335335
)
336+
337+
add_proxy_header_library(
338+
struct_iovec
339+
HDRS
340+
struct_iovec.h
341+
FULL_BUILD_DEPENDS
342+
libc.include.llvm-libc-types.struct_iovec
343+
libc.include.sys_uio
344+
)

libc/hdr/types/struct_iovec.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//===-- Proxy for struct iovec -------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
#ifndef LLVM_LIBC_HDR_TYPES_STRUCT_IOVEC_H
9+
#define LLVM_LIBC_HDR_TYPES_STRUCT_IOVEC_H
10+
11+
#ifdef LIBC_FULL_BUILD
12+
13+
#include "include/llvm-libc-types/struct_iovec.h"
14+
15+
#else
16+
17+
#include <sys/uio.h>
18+
19+
#endif // LIBC_FULL_BUILD
20+
21+
#endif // LLVM_LIBC_HDR_TYPES_STRUCT_IOVEC_H

libc/include/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,16 @@ add_header_macro(
632632
.llvm-libc-types.struct_utsname
633633
)
634634

635+
add_header_macro(
636+
sys_uio
637+
../libc/include/sys/uio.yaml
638+
sys/uio.h
639+
DEPENDS
640+
.llvm_libc_common_h
641+
.llvm-libc-types.struct_iovec
642+
.llvm-libc-types.ssize_t
643+
)
644+
635645
add_header_macro(
636646
sys_wait
637647
../libc/include/sys/wait.yaml

libc/include/sys/uio.h.def

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//===-- POSIX header uio.h ------------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_SYS_UIO_H
10+
#define LLVM_LIBC_SYS_UIO_H
11+
12+
#include "__llvm-libc-common.h"
13+
14+
%%public_api()
15+
16+
#endif // LLVM_LIBC_SYS_UIO_H

libc/include/sys/uio.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
header: sys/uio.h
2+
header_template: uio.h.def
3+
macros: []
4+
types:
5+
- type_name: struct_iovec
6+
- type_name: ssize_t
7+
enums: []
8+
objects: []
9+
functions:
10+
- name: writev
11+
standards:
12+
- POSIX
13+
return_type: ssize_t
14+
arguments:
15+
- type: int
16+
- type: const struct iovec *
17+
- type: int

libc/src/sys/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ add_subdirectory(statvfs)
1111
add_subdirectory(utsname)
1212
add_subdirectory(wait)
1313
add_subdirectory(prctl)
14+
add_subdirectory(uio)

0 commit comments

Comments
 (0)