[libc][NFC] Move sys/ucontext.h to YAML generation (#194573)

Renamed sys/ucontext.h to sys/ucontext.h.def and created a corresponding
sys/ucontext.yaml, following the pattern used by sys/prctl. Updated
CMakeLists.txt to use add_header_macro.

Also removed the orphaned top-level ucontext.h.def which was never
referenced by ucontext.yaml.
This commit is contained in:
Jeff Bailey
2026-04-28 14:29:08 +01:00
committed by GitHub
parent cd950962a9
commit a2409e07ce
4 changed files with 12 additions and 20 deletions

View File

@@ -477,10 +477,12 @@ if(LIBC_TARGET_ARCHITECTURE STREQUAL "x86_64")
.llvm-libc-types.stack_t
)
add_header(
add_header_macro(
sys_ucontext
HDR
sys/ucontext.h
../libc/include/sys/ucontext.yaml
sys/ucontext.h
DEPENDS
.ucontext
)
endif()

View File

@@ -1,4 +1,4 @@
//===-- POSIX header sys/ucontext.h ---------------------------------------===//
//===-- GNU header sys/ucontext.h -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -11,4 +11,6 @@
#include <ucontext.h>
%%public_api()
#endif // LLVM_LIBC_SYS_UCONTEXT_H

View File

@@ -0,0 +1,4 @@
header: sys/ucontext.h
header_template: ucontext.h.def
standards:
- gnu

View File

@@ -1,16 +0,0 @@
//===-- POSIX header ucontext.h --------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_UCONTEXT_H
#define LLVM_LIBC_UCONTEXT_H
#include "__llvm-libc-common.h"
%%public_api()
#endif // LLVM_LIBC_UCONTEXT_H