1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-23 04:12:02 +00:00
Atmosphere/libraries/libmesosphere/source
Léo Lam 496adb0018
Minor header fixes to reduce parsing issues with Clang (#1700)
* Work around Clang's incomplete C++20 support for omitting typename

* vapours: fix Clang error about missing return in constexpr function

* stratosphere: fix call to non-constexpr strlen in constexpr function

strlen being constexpr is a non-compliant GCC extension; Clang
explicitly rejects it: https://reviews.llvm.org/D23692

* stratosphere: add a bunch of missing override specifiers

* stratosphere: work around Clang consteval bug

Minimal example: https://godbolt.org/z/MoM64v93M

The issue seems to be that Clang does not consider f(x) to be a
constant expression if x comes from a template argument that isn't
a non-type auto template argument (???)

We can work around this by relaxing GetMessageHeaderForCheck (by using
constexpr instead of consteval). This produces no functional changes
because the result of GetMessageHeaderForCheck() is assigned to a
constexpr variable, so the result is guaranteed to be computed
at compile-time.

* stratosphere: fix missing require clauses in definitions

GCC not requiring the require clauses to be repeated for member
definitions is actually a compiler bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96830

Clang rejects declarations with missing require clauses.

* Fix ALWAYS_INLINE_LAMBDA and parameter list relative order

While GCC doesn't seem to care about the position of the always_inline
attribute relative to the parameter list, Clang is very picky
and requires the attribute to appear after the parameter list
(and before a trailing return type)

* stratosphere: fix static constexpr member variable with incomplete type

GCC accepts this for some reason (because of the lambda?) but Clang
correctly rejects this.
2021-11-06 18:19:34 -07:00
..
arch kern: fix minor assembly bugs, avoid unnecessary function call in KScheduler hotloop 2021-10-28 19:16:23 -07:00
board Minor header fixes to reduce parsing issues with Clang (#1700) 2021-11-06 18:19:34 -07:00
init ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
libc ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
svc Minor header fixes to reduce parsing issues with Clang (#1700) 2021-11-06 18:19:34 -07:00
kern_debug_log.cpp kern/test: add wip qemu-virt board support to mesosphere 2021-10-25 17:31:14 -07:00
kern_debug_log_impl.arch.arm64.s kern/test: add wip qemu-virt board support to mesosphere 2021-10-25 17:31:14 -07:00
kern_debug_log_impl.board.nintendo_nx.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_debug_log_impl.board.qemu_virt.cpp kern/test: add wip qemu-virt board support to mesosphere 2021-10-25 17:31:14 -07:00
kern_debug_log_impl.hpp kern/test: add wip qemu-virt board support to mesosphere 2021-10-25 17:31:14 -07:00
kern_initial_process.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_address_arbiter.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_address_space_info.cpp strat: remove map namespace, svc: add address space defs 2021-10-05 12:22:34 -07:00
kern_k_capabilities.cpp kern: add toggleable support for 40-bit physaddr caps 2021-10-25 17:31:14 -07:00
kern_k_class_token.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_client_port.cpp util: better match true std::atomic semantics 2021-10-20 11:02:17 -07:00
kern_k_client_session.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_code_memory.cpp kern: devirtualize several KAutoObject functions 2021-10-23 21:13:26 -07:00
kern_k_condition_variable.cpp kern: other dmbs in kernel were already dmb ish 2021-10-25 17:38:50 -07:00
kern_k_debug_base.cpp kern: devirtualize most things that are free to devirtualize (see #1672) 2021-10-24 13:04:31 -07:00
kern_k_device_address_space.cpp kern: devirtualize several KAutoObject functions 2021-10-23 21:13:26 -07:00
kern_k_dpc_manager.cpp kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-23 15:25:20 -07:00
kern_k_dump_object.cpp kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-23 15:25:20 -07:00
kern_k_event.cpp kern: devirtualize several KAutoObject functions 2021-10-23 21:13:26 -07:00
kern_k_handle_table.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_initial_process_reader.cpp kern: reflect nintendo cache management behavior for initial processes 2021-10-25 13:02:35 -07:00
kern_k_interrupt_event.cpp kern: devirtualize several KAutoObject functions 2021-10-23 21:13:26 -07:00
kern_k_interrupt_task_manager.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_io_pool.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_io_pool.unsupported.inc ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_io_region.cpp svc: refactor/rename MemoryInfo fields 2021-10-05 15:16:54 -07:00
kern_k_light_client_session.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_light_condition_variable.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_light_lock.cpp kern/util: use custom atomics wrapper to substantially improve codegen 2021-10-19 15:24:15 -07:00
kern_k_light_server_session.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_light_session.cpp kern: devirtualize remaining vcall for class token/dyncast 2021-10-23 16:04:04 -07:00
kern_k_memory_block_manager.cpp dmnt2: detect thread name, add monitor get mapping(s), increase buffer sizes 2021-11-03 23:56:25 -07:00
kern_k_memory_layout.board.nintendo_nx.cpp Minor header fixes to reduce parsing issues with Clang (#1700) 2021-11-06 18:19:34 -07:00
kern_k_memory_layout.board.qemu_virt.cpp kern: add (and use) generic KSystemControlBase 2021-10-25 17:31:14 -07:00
kern_k_memory_layout.cpp kern: fix some lingering non-m_ member variables 2021-10-09 15:46:04 -07:00
kern_k_memory_manager.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_object_name.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_page_group.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_page_heap.cpp kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-23 15:25:20 -07:00
kern_k_page_table_base.cpp Minor header fixes to reduce parsing issues with Clang (#1700) 2021-11-06 18:19:34 -07:00
kern_k_port.cpp kern: devirtualize remaining vcall for class token/dyncast 2021-10-23 16:04:04 -07:00
kern_k_process.cpp kern: add (and use) generic KSystemControlBase 2021-10-25 17:31:14 -07:00
kern_k_readable_event.cpp kern: devirtualize KReadableEvent::Reset, KWorkerTask::DoWorkerTask 2021-10-24 20:41:38 -07:00
kern_k_resource_limit.cpp kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-23 15:25:20 -07:00
kern_k_scheduler.cpp KScheduler big brain strat for mdscr_el1 cfg change 2021-11-05 23:38:43 -07:00
kern_k_scoped_disable_dispatch.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_server_port.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_server_session.cpp kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-23 15:25:20 -07:00
kern_k_session.cpp kern: devirtualize remaining vcall for class token/dyncast 2021-10-23 16:04:04 -07:00
kern_k_session_request.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_shared_memory.cpp kern: devirtualize several KAutoObject functions 2021-10-23 21:13:26 -07:00
kern_k_synchronization_object.cpp kern: devirtualize most things that are free to devirtualize (see #1672) 2021-10-24 13:04:31 -07:00
kern_k_system_control_base.cpp Minor header fixes to reduce parsing issues with Clang (#1700) 2021-11-06 18:19:34 -07:00
kern_k_thread.cpp Minor header fixes to reduce parsing issues with Clang (#1700) 2021-11-06 18:19:34 -07:00
kern_k_thread_local_page.cpp ams: replace most remaining operator & with std::addressof 2021-10-09 14:49:53 -07:00
kern_k_thread_queue.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_trace.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_transfer_memory.cpp kern: devirtualize several KAutoObject functions 2021-10-23 21:13:26 -07:00
kern_k_unused_slab_memory.cpp kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-23 15:25:20 -07:00
kern_k_wait_object.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_k_worker_task_manager.cpp kern: devirtualize KReadableEvent::Reset, KWorkerTask::DoWorkerTask 2021-10-24 20:41:38 -07:00
kern_kernel.cpp kern: add (and use) generic KSystemControlBase 2021-10-25 17:31:14 -07:00
kern_main.cpp ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-04 12:59:10 -07:00
kern_panic.cpp util: better match true std::atomic semantics 2021-10-20 11:02:17 -07:00