Skip to content

Instantly share code, notes, and snippets.

View EricWF's full-sized avatar

Eric EricWF

View GitHub Profile
@EricWF
EricWF / Instructions.md
Last active April 7, 2022 03:06
Running libc++'s test suite.
  1. Checkout the LLVM sources somewhere persistent, for example /opt/llvm-src.
git clone https://llvm.org/git/llvm.git /opt/llvm-src
  1. Create an permanent alias to the LIT test driver. This alias will be how you invoke the tests.

@EricWF
EricWF / constinit.md
Last active July 16, 2020 09:07
A Proposal to add [[constinit]] to C++
Document Number: P1143r3
Date: 2019-06-18
Project: Programming Language C++, Evolution
Revises: P1143r2
Reply to: eric@efcs.ca

Adding the constinit keyword

v4l2-compliance SHA: not available, 64 bits
Compliance test for uvcvideo device /dev/video0:
Driver Info:
Driver name : uvcvideo
Card type : Live Streaming USB Device: Live
Bus info : usb-0000:00:14.0-6
Driver version : 5.2.17
Capabilities : 0x84a00001
// RUN: $CXX -c %s -o /tmp/first.o -std=c++17 -g
// RUN: $CXX -c %s -o /tmp/second.o -std=c++17 -g -DWITH_MAIN
// RUN: $CXX -o /tmp/test.out /tmp/first.o /tmp/second.o
// RUN: /tmp/test.out
#include <cassert>
#define ABSL_INTERNAL_UNIQUE_SMALL_NAME2(x) #x
#define ABSL_INTERNAL_UNIQUE_SMALL_NAME1(x) ABSL_INTERNAL_UNIQUE_SMALL_NAME2(x)
#define ABSL_INTERNAL_UNIQUE_SMALL_NAME() \
// RUN: $CXX -c %s -o /tmp/first.o -std=c++17 -g
// RUN: $CXX -c %s -o /tmp/second.o -std=c++17 -g -DWITH_MAIN
// RUN: $CXX -o /tmp/test.out /tmp/first.o /tmp/second.o
// RUN: /tmp/test.out
#include <cassert>
namespace {
__attribute__((noinline))
int bar() asm(".my-name");
#ifdef SYS_HEADER
#pragma GCC system_header
#endif
template <class Ret, class Fn, class ...Args>
constexpr Ret foo(Fn fn, Args... args) { return fn(args...); }
3946218306
62183069
32000 : __front_spare() == 384 : __back_spare() == 383 : __capacity() == 32767 : bytes allocated == 32840
31000 : __front_spare() == 884 : __back_spare() == 883 : __capacity() == 32767 : bytes allocated == 32840
30000 : __front_spare() == 1384 : __back_spare() == 1383 : __capacity() == 32767 : bytes allocated == 32840
29000 : __front_spare() == 1884 : __back_spare() == 1883 : __capacity() == 32767 : bytes allocated == 32840
28000 : __front_spare() == 2384 : __back_spare() == 2383 : __capacity() == 32767 : bytes allocated == 32840
27000 : __front_spare() == 2884 : __back_spare() == 2883 : __capacity() == 32767 : bytes allocated == 32840
26000 : __front_spare() == 3384 : __back_spare() == 3383 : __capacity() == 32767 : bytes allocated == 32840
25000 : __front_spare() == 3884 : __back_spare() == 3883 : __capacity() == 32767 : bytes allocated == 32840
24000 : __front_spare() == 288 : __back_spare() == 287 : __capacity() == 24575 : bytes allocated == 24648
23000 : __front_spare() == 788 : __back_spare() == 787 : _
Passing Tests (481):
libc++ :: std/algorithms/alg.c.library/tested_elsewhere.pass.cpp
libc++ :: std/atomics/atomics.fences/atomic_signal_fence.pass.cpp
libc++ :: std/atomics/atomics.fences/atomic_thread_fence.pass.cpp
libc++ :: std/atomics/atomics.flag/atomic_flag_clear.pass.cpp
libc++ :: std/atomics/atomics.flag/atomic_flag_clear_explicit.pass.cpp
libc++ :: std/atomics/atomics.flag/atomic_flag_test_and_set.pass.cpp
libc++ :: std/atomics/atomics.flag/atomic_flag_test_and_set_explicit.pass.cpp
libc++ :: std/atomics/atomics.flag/clear.pass.cpp
###############################################################################
# Appveyor configuration file for LLVM
# -----------------------------------------------------------------------------
# This appveyor.yml is for the LLVM repository (Example: github.com/llvm-mirror/llvm)
# It builds LLVM, Clang, Clang tools extra, LLD.
###############################################################################
version: '{build}'
shallow_clone: true