mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
[libc] Convert dlfcn.h to pure YAML (#149362)
Remove the unnecessary .h.def file and move all the macro definitions directly into dlfcn.yaml.
This commit is contained in:
@@ -69,7 +69,6 @@ add_header_macro(
|
||||
../libc/include/dlfcn.yaml
|
||||
dlfcn.h
|
||||
DEPENDS
|
||||
.llvm-libc-macros.dlfcn_macros
|
||||
.llvm_libc_common_h
|
||||
)
|
||||
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
//===-- C standard library header dlfcn.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_DLFCN_H
|
||||
#define LLVM_LIBC_DLFCN_H
|
||||
|
||||
#include "__llvm-libc-common.h"
|
||||
#include "llvm-libc-macros/dlfcn-macros.h"
|
||||
|
||||
%%public_api()
|
||||
|
||||
#endif // LLVM_LIBC_DLFCN_H
|
||||
@@ -1,17 +1,34 @@
|
||||
header: dlfcn.h
|
||||
header_template: dlfcn.h.def
|
||||
standards:
|
||||
- posix
|
||||
macros:
|
||||
# Note that macro values are quoted to keep the integer literals as
|
||||
# written. Without the quotes, YAML will normalize them to minimal
|
||||
# decimal, which is less readable for humans seeing the generated header.
|
||||
- macro_name: RTLD_LAZY
|
||||
macro_header: dlfcn-macros.h
|
||||
macro_value: "0x00001"
|
||||
- macro_name: RTLD_NOW
|
||||
macro_header: dlfcn-macros.h
|
||||
macro_value: "0x00002"
|
||||
- macro_name: RTLD_GLOBAL
|
||||
macro_header: dlfcn-macros.h
|
||||
macro_value: "0x00100"
|
||||
- macro_name: RTLD_LOCAL
|
||||
macro_header: dlfcn-macros.h
|
||||
types: []
|
||||
enums: []
|
||||
objects: []
|
||||
macro_value: "0"
|
||||
- macro_name: RTLD_BINDING_MASK
|
||||
standards:
|
||||
- gnu
|
||||
macro_value: "0x00003"
|
||||
- macro_name: RTLD_NOLOAD
|
||||
standards:
|
||||
- gnu
|
||||
macro_value: "0x00004"
|
||||
- macro_name: RTLD_DEEPBIND
|
||||
standards:
|
||||
- gnu
|
||||
macro_value: "0x00008"
|
||||
- macro_name: RTLD_NODELETE
|
||||
standards:
|
||||
- gnu
|
||||
macro_value: "0x01000"
|
||||
functions:
|
||||
- name: dlclose
|
||||
standards:
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
//===-- Definition of macros from dlfcn.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_MACROS_DLFCN_MACROS_H
|
||||
#define LLVM_LIBC_MACROS_DLFCN_MACROS_H
|
||||
|
||||
#define RTLD_LAZY 0x00001
|
||||
#define RTLD_NOW 0x00002
|
||||
#define RTLD_GLOBAL 0x00100
|
||||
#define RTLD_LOCAL 0
|
||||
|
||||
// Non-standard stuff here
|
||||
#define RTLD_BINDING_MASK 0x3
|
||||
#define RTLD_NOLOAD 0x00004
|
||||
#define RTLD_DEEPBIND 0x00008
|
||||
#define RTLD_NODELETE 0x01000
|
||||
|
||||
#endif // LLVM_LIBC_MACROS_DLFCN_MACROS_H
|
||||
Reference in New Issue
Block a user