Skip to content

Commit 6794a6a

Browse files
Make <xatomic.h>, <xbit_ops.h>, and <xerrc.h> core headers (#3116)
1 parent 3323648 commit 6794a6a

File tree

4 files changed

+24
-6
lines changed

4 files changed

+24
-6
lines changed

stl/inc/xatomic.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// xatomic.h internal header
1+
// xatomic.h internal header (core)
22

33
// Copyright (c) Microsoft Corporation.
44
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

66
#pragma once
77
#ifndef _XATOMIC_H
88
#define _XATOMIC_H
9-
#include <yvals.h>
9+
#include <yvals_core.h>
1010
#if _STL_COMPILER_PREPROCESSOR
1111

1212
#include <intrin0.h>

stl/inc/xbit_ops.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// xbit_ops.h internal header
1+
// xbit_ops.h internal header (core)
22

33
// Copyright (c) Microsoft Corporation.
44
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

66
#pragma once
77
#ifndef _XBIT_OPS_H
88
#define _XBIT_OPS_H
9-
#include <yvals.h>
9+
#include <yvals_core.h>
1010
#if _STL_COMPILER_PREPROCESSOR
1111

1212
#include <cstdint>

stl/inc/xerrc.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// xerrc.h internal header
1+
// xerrc.h internal header (core)
22

33
// Copyright (c) Microsoft Corporation.
44
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
55

66
#pragma once
77
#ifndef _XERRC_H
88
#define _XERRC_H
9-
#include <yvals.h>
9+
#include <yvals_core.h>
1010
#if _STL_COMPILER_PREPROCESSOR
1111

1212
#pragma pack(push, _CRT_PACKING)

tests/std/tests/GH_001411_core_headers/test.cpp

+18
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@
66

77
#include <__msvc_all_public_headers.hpp>
88

9+
// Also test GH-3103 "<xatomic.h>: Investigate making this a core header" and other internal core headers
10+
#include <__msvc_int128.hpp>
11+
#include <__msvc_system_error_abi.hpp>
12+
#include <__msvc_xlocinfo_types.hpp>
13+
#include <xatomic.h>
14+
#include <xbit_ops.h>
15+
#include <xerrc.h>
16+
17+
#if _HAS_CXX17
18+
#include <xfilesystem_abi.h>
19+
#endif // _HAS_CXX17
20+
21+
// <__msvc_iter_core.hpp> is included by <tuple>
22+
// <xkeycheck.h> should not be included outside of <yvals_core.h>
23+
// <xstddef> is included by <type_traits>
24+
// <xtr1common> is included by <cstddef>
25+
// <yvals_core.h> is included by every public core header
26+
927
#ifdef _YVALS
1028
#error Core headers should not include <yvals.h>.
1129
#endif

0 commit comments

Comments
 (0)