diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-07-11 02:27:57 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-07-11 02:27:57 +0000 |
| commit | 5154dce6388e3aaa445467030df7a45ed1211abe (patch) | |
| tree | a2f16f8f225d435868a4941c731aee3f8255d0d9 /lib/CodeGen/CGExprAgg.cpp | |
| parent | 27ec2d0acc51fc661f3ab10693565f5f0653b294 (diff) | |
| download | clang-5154dce6388e3aaa445467030df7a45ed1211abe.tar.gz clang-5154dce6388e3aaa445467030df7a45ed1211abe.tar.bz2 clang-5154dce6388e3aaa445467030df7a45ed1211abe.tar.xz | |
Add a __builtin_addressof that performs the same functionality as the built-in
& operator (ignoring any overloaded operator& for the type). The purpose of
this builtin is for use in std::addressof, to allow it to be made constexpr;
the existing implementation technique (reinterpret_cast to some reference type,
take address, reinterpert_cast back) does not permit this because
reinterpret_cast between reference types is not permitted in a constant
expression in C++11 onwards.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186053 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
0 files changed, 0 insertions, 0 deletions
