CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
111 lines
2.5 KiB
C++
111 lines
2.5 KiB
C++
// RUN: rm -rf %t
|
|
// RUN: mkdir -p %t
|
|
// RUN: split-file %s %t
|
|
// RUN: cd %t
|
|
//
|
|
// RUN: %clang_cc1 -fmodule-name=A -xc++ -emit-module -fmodules \
|
|
// RUN: -fno-cxx-modules -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd -std=c++20 -I. a.modulemap -o a.pcm
|
|
//
|
|
// RUN: %clang_cc1 -fmodule-name=B -xc++ -emit-module -fmodules \
|
|
// RUN: -fno-cxx-modules -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd -std=c++20 -I. b.modulemap -o b.pcm
|
|
//
|
|
// RUN: %clang_cc1 -fmodule-name=C -xc++ -emit-module -fmodules \
|
|
// RUN: -fno-cxx-modules -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd -std=c++20 -I. c.modulemap -o c.pcm
|
|
//
|
|
// RUN: %clang_cc1 -fno-cxx-modules -fmodules -fno-implicit-modules \
|
|
// RUN: -fmodule-map-file-home-is-cwd \
|
|
// RUN: -fmodule-file=a.pcm -fmodule-file=b.pcm -fmodule-file=c.pcm \
|
|
// RUN: -std=c++20 -I. main.cpp -o /dev/null
|
|
|
|
//--- a.modulemap
|
|
module "A" { header "a.h" }
|
|
//--- b.modulemap
|
|
module "B" { header "b.h" }
|
|
//--- c.modulemap
|
|
module "C" { header "c.h" }
|
|
|
|
//--- common.h
|
|
#pragma once
|
|
#include "stl.h"
|
|
|
|
//--- a.h
|
|
#pragma once
|
|
#include "common.h"
|
|
#include "repro.h"
|
|
|
|
//--- b.h
|
|
#pragma once
|
|
#include "common.h"
|
|
#include "repro.h"
|
|
|
|
//--- c.h
|
|
#pragma once
|
|
#include "common.h"
|
|
#include "repro.h"
|
|
|
|
//--- repro.h
|
|
#pragma once
|
|
#include "stl.h"
|
|
|
|
namespace k {
|
|
template <template <typename> class , typename >
|
|
struct is_instantiation : std::integral_constant<bool, false> {};
|
|
template <template <typename> class C, typename T>
|
|
constexpr bool is_instantiation_v = is_instantiation<C, T>::value;
|
|
}
|
|
|
|
struct ThreadState;
|
|
|
|
namespace cc::subtle {
|
|
template <typename T>
|
|
class U;
|
|
}
|
|
namespace cc {
|
|
template <typename T> class Co;
|
|
namespace internal {
|
|
template <typename T>
|
|
class Promise {
|
|
static_assert(!k::is_instantiation_v<subtle::U, T>);
|
|
};
|
|
}
|
|
}
|
|
|
|
//--- stl.h
|
|
#pragma once
|
|
namespace std {
|
|
inline namespace abi {
|
|
template <class _Tp, _Tp __v>
|
|
struct integral_constant {
|
|
static const _Tp value = __v;
|
|
};
|
|
template <class _Tp, class _Up>
|
|
constexpr bool is_same_v = __is_same(_Tp, _Up);
|
|
template <class _Tp>
|
|
using decay_t = __decay(_Tp);
|
|
|
|
template <class>
|
|
struct __invoke_result_impl ;
|
|
template <class... _Args>
|
|
using invoke_result_t = __invoke_result_impl<_Args...>;
|
|
}
|
|
}
|
|
|
|
//--- main.cpp
|
|
#include "a.h"
|
|
#include "stl.h"
|
|
|
|
namespace cc {
|
|
template <typename F>
|
|
requires k::is_instantiation_v<Co, std::invoke_result_t<F>>
|
|
using result_type =
|
|
std::invoke_result_t<F>;
|
|
}
|
|
namespace cc::internal {
|
|
class final {
|
|
Promise<ThreadState> outgoing_work_;
|
|
};
|
|
}
|