Skip to content

Instantly share code, notes, and snippets.

View EricWF's full-sized avatar

Eric EricWF

View GitHub Profile
SYMBOL REMOVED: {'type': 'FUNC', 'name': '_ZNSt3__110__find_endIPFbccEPKcS4_EET0_S5_S5_T1_S6_T_NS_26random_access_iterator_tagES8_'}
SYMBOL REMOVED: {'type': 'FUNC', 'name': '_ZNSt3__110__find_endIPFbwwEPKwS4_EET0_S5_S5_T1_S6_T_NS_26random_access_iterator_tagES8_'}
SYMBOL REMOVED: {'type': 'FUNC', 'name': '_ZNSt3__111unique_lockINS_5mutexEE6unlockEv'}
SYMBOL REMOVED: {'type': 'FUNC', 'name': '_ZNSt3__112__rotate_gcdINS_11__wrap_iterIPcEEEET_S4_S4_S4_'}
SYMBOL REMOVED: {'type': 'FUNC', 'name': '_ZNSt3__112__rotate_gcdINS_11__wrap_iterIPwEEEET_S4_S4_S4_'}
SYMBOL REMOVED: {'type': 'FUNC', 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6__initIPKcEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueEvE4typeESA_SA_'}
SYMBOL REMOVED: {'type': 'FUNC', 'name': '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendIPcEENS_9enable_ifIXsr21__is_forward_iteratorIT_EE5valueERS5_E4typeES9_S9_'}
SYMBOL REMOVED: {'type': 'FUNC', 'name': '_ZNSt3__112basic_stringIwNS_11char_traitsIwEEN
@EricWF
EricWF / lit.cfg.py
Last active August 29, 2015 14:09
libcxxabi_lit.patch
# -*- Python -*- vim: set syntax=python tabstop=4 expandtab cc=80:
# Configuration file for the 'lit' test runner.
import errno
import os
import platform
import re
import shlex
import signal
@EricWF
EricWF / cmake.patch
Created November 14, 2014 21:20
cmake.patch
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index cd8553c..2a6df3d 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -55,27 +55,38 @@ append_if(link_flags LIBCXX_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs)
if ( APPLE )
if ( CMAKE_OSX_DEPLOYMENT_TARGET STREQUAL "10.6" )
+ if (LIBCXX_CXX_ABI_LIBNAME STREQUAL "libcxxabi" OR
+ LIBCXX_CXX_ABI_LIBNAME STREQUAL "none")
@EricWF
EricWF / abi.patch
Created December 19, 2014 21:26
New patch
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 58abdf8..701187d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -43,6 +43,7 @@ option(LIBCXX_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
option(LIBCXX_ENABLE_CXX1Y "Enable -std=c++1y and use of c++1y language features if the compiler supports it." OFF)
option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON)
option(LIBCXX_ENABLE_THREADS "Build libc++ with support for threads." ON)
+option(LIBCXX_ENABLE_UNSTABLE_ABI "Build with the unstable ABI changes." OFF)
option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++" OFF)
@EricWF
EricWF / Notes.md
Last active August 29, 2015 14:14
fundamentals TS and `std::any_cast<T &>((any*)nullptr))`

I wanted to talk to you about how I handle std::any_cast<int &>(static_cast<any *>(nullptr)). The current fundamentals draft is not clear about how what happens when you call the non-throwing any_cast with a reference type. However there is a problem.

The signature of the non_throwing any_cast is as follows:

template<class ValueType>
const ValueType* any_cast(const any* operand) noexcept;

template<class ValueType>
ValueType* any_cast(any* operand) noexcept;
struct T {
int x[10];
};
int main() {
T t1;
t1.x[0] = 42;
T t2 = t1;
asm volatile("" : "+rm" (t2));
@EricWF
EricWF / Presentation.md
Last active August 29, 2015 14:18
Presentation

Getting a Benchmarking Library

Google Benchmark

  • Similar interface to GTest
  • Based off testing/base/benchmark
  • New and shiny interface.

Example Usage:

@EricWF
EricWF / c++03fix.diff
Created April 30, 2015 18:13
Test Fix for C++03
diff --git a/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp b/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp
index 9dc2ef9..eeb4373 100644
--- a/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp
+++ b/test/std/experimental/algorithms/alg.random.sample/sample.fail.cpp
@@ -32,5 +32,5 @@ template <class PopulationIterator, class SampleIterator> void test() {
}
int main() {
- test<input_iterator<int *>, output_iterator<int *>>();
+ test<input_iterator<int *>, output_iterator<int *> >();
@EricWF
EricWF / coverage.patch
Created April 30, 2015 19:42
Coverage change for Benchmark
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 5fb0b29..38277ab 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -54,11 +54,13 @@ if (${CMAKE_BUILD_TYPE} MATCHES "[Cc]overage")
if (GCOV AND LCOV AND GENHTML AND MAKE AND "${CMAKE_GENERATOR}" STREQUAL "Unix Makefiles")
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/lcov/index.html
- COMMAND ${LCOV} -q -z -d .
- COMMAND ${LCOV} --no-external -q -c -b "${CMAKE_BINARY_DIR}" -d . -o initial.lcov -i
@EricWF
EricWF / sample.diff
Last active August 29, 2015 14:20
Misc additions to sample patch
diff --git a/include/experimental/algorithm b/include/experimental/algorithm
new file mode 100644
index 0000000..a2e956f
--- /dev/null
+++ b/include/experimental/algorithm
@@ -0,0 +1,114 @@
+// -*- C++ -*-
+//===-------------------------- algorithm ---------------------------------===//
+//
+// The LLVM Compiler Infrastructure