llvm with tablegen backend for capstone disassembler
Go to file
Sam McCall d1a7a37c22 [clangd] Pass Context implicitly using TLS.
Summary:
Instead of passing Context explicitly around, we now have a thread-local
Context object `Context::current()` which is an implicit argument to
every function.
Most manipulation of this should use the WithContextValue helper, which
augments the current Context to add a single KV pair, and restores the
old context on destruction.

Advantages are:
- less boilerplate in functions that just propagate contexts
- reading most code doesn't require understanding context at all, and
  using context as values in fewer places still
- fewer options to pass the "wrong" context when it changes within a
  scope (e.g. when using Span)
- contexts pass through interfaces we can't modify, such as VFS
- propagating contexts across threads was slightly tricky (e.g.
  copy vs move, no move-init in lambdas), and is now encapsulated in
  the threadpool

Disadvantages are all the usual TLS stuff - hidden magic, and
potential for higher memory usage on threads that don't use the
context. (In practice, it's just one pointer)

Reviewers: ilya-biryukov

Subscribers: klimek, jkorous-apple, ioeric, cfe-commits

Differential Revision: https://reviews.llvm.org/D42517

llvm-svn: 323872
2018-01-31 13:40:48 +00:00
clang Fix typo. NFC 2018-01-31 12:06:15 +00:00
clang-tools-extra [clangd] Pass Context implicitly using TLS. 2018-01-31 13:40:48 +00:00
compiler-rt [sanitizer] Move readlinkat.c test from Linux to Posix 2018-01-31 00:04:10 +00:00
debuginfo-tests [debuginfo-tests] Support moving debuginfo-tests to llvm/projects 2017-12-12 16:54:20 +00:00
libclc math.h: Set HAVE_HW_FMA32 based on compiler provided macro 2018-01-29 19:05:08 +00:00
libcxx Add LWG3051 2018-01-30 21:49:17 +00:00
libcxxabi [cmake] [libcxxabi] LLVM_FOUND isn't always set, so just test if 2018-01-27 19:18:04 +00:00
libunwind [cmake] [libunwind] LLVM_FOUND isn't always set, so just test if 2018-01-27 19:31:44 +00:00
lld [ELF] Make overlapping output sections an error 2018-01-31 09:22:44 +00:00
lldb Fix TestTargetSymbolsAddCommand makefile 2018-01-31 09:14:12 +00:00
llgo
llvm Take into account the cost of local intervals when selecting split candidate. 2018-01-31 13:31:08 +00:00
openmp [libomptarget] Check for library with CUDA Driver API 2018-01-30 16:49:13 +00:00
parallel-libs
polly Change memcpy/memove/memset to have dest and source alignment attributes. 2018-01-28 18:13:57 +00:00
README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.