llvm-project/llvm
Chandler Carruth 6145f7dadc [ADT] Add an abstraction for embedding an integer within a pointer-like
type.

This makes it easy and safe to use a set of flags as one elmenet of
a tagged union with pointers. There is quite a bit of code that has
historically done this by casting arbitrary integers to "pointers" and
assuming that this was safe and reliable. It is neither, and has started
to rear its head by triggering safety asserts in various abstractions
like PointerLikeTypeTraits when the integers chosen are invariably poor
choices for *some* platform and *some* situation. Not to mention the
(hopefully unlikely) prospect of one of these integers actually getting
allocated!

With this, it will be straightforward to build type safe abstractions
like this without being error prone. The abstraction itself is also
remarkably simple thanks to the implicit conversion.

This use case and pattern was also independently created by the folks
working on Swift, and they're going to incrementally add any missing
functionality they find.

Differential Revision: http://reviews.llvm.org/D15844

llvm-svn: 257284
2016-01-10 09:40:13 +00:00
..
autoconf [OPENMP] Make -fopenmp to turn on OpenMP support by default. 2015-12-10 05:45:58 +00:00
bindings Deprecate a few C APIs. 2015-12-18 23:46:42 +00:00
cmake tools/llvm-config: improve shared library support 2016-01-07 00:18:56 +00:00
docs [LangRef] Move catchpad to "Other Operators" (NFC) 2016-01-10 04:46:10 +00:00
examples [Orc] Fix Kaleidoscope example for change in r254693. 2015-12-04 02:32:32 +00:00
include [ADT] Add an abstraction for embedding an integer within a pointer-like 2016-01-10 09:40:13 +00:00
lib [AVX512] add PRORVQ and PRORVD Intrinsic 2016-01-10 09:16:41 +00:00
projects
resources
test [AVX512] add PRORVQ and PRORVD Intrinsic 2016-01-10 09:16:41 +00:00
tools [Orc] Enable user-supplied memory managers in the CompileOnDemand layer. 2016-01-09 20:55:18 +00:00
unittests [ADT] Add an abstraction for embedding an integer within a pointer-like 2016-01-10 09:40:13 +00:00
utils Revert "Teach the CMake build system to run lit's test suite. These can be run" 2016-01-09 21:42:57 +00:00
.arcconfig
.clang-format
.clang-tidy adding readability-identifier-naming to llvm clang-tidy configuration. 2015-12-08 17:44:51 +00:00
.gitignore
CMakeLists.txt Revert "Teach the CMake build system to run lit's test suite. These can be run" 2016-01-09 21:42:57 +00:00
CODE_OWNERS.TXT The PS4 baton passes. 2015-12-19 20:04:03 +00:00
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in
Makefile.rules Create Makefile variables for 'share' and 'libexec' 2015-11-09 16:10:00 +00:00
README.txt Revert previous test commit. 2016-01-04 19:13:29 +00:00
configure [OPENMP] Make -fopenmp to turn on OpenMP support by default. 2015-12-10 05:45:58 +00:00
llvm.spec.in

README.txt

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.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you are writing a package for LLVM, see docs/Packaging.rst for our
suggestions.