History log of /llvm-project/clang/lib/Frontend/InitPreprocessor.cpp (Results 26 – 50 of 493)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 72c373bf 26-Apr-2024 Aaron Ballman <aaron@aaronballman.com>

[C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (#89446)

These macros are used by STL implementations to support implementation
of std::hardware_destructive_interference_size and
std::hardware_constr

[C++17] Support __GCC_[CON|DE]STRUCTIVE_SIZE (#89446)

These macros are used by STL implementations to support implementation
of std::hardware_destructive_interference_size and
std::hardware_constructive_interference_size

Fixes #60174

---------

Co-authored-by: Louis Dionne <ldionne.2@gmail.com>

show more ...


# f2d99506 25-Apr-2024 Chris B <chris.bieneman@me.com>

[HLSL] Correctly set `__HLSL_ENABLE_16_BIT` (#89788)

The preprocessor define `__HLSL_ENABLE_16_BIT` should be set to 1 if
native 16-bit types are enabled and not set if they are not.

Previously

[HLSL] Correctly set `__HLSL_ENABLE_16_BIT` (#89788)

The preprocessor define `__HLSL_ENABLE_16_BIT` should be set to 1 if
native 16-bit types are enabled and not set if they are not.

Previously we were setting the value to match the HLSL active language
version, and we had no test coverage verifing the value was set and not
set as expected.

Fixes #89787

show more ...


Revision tags: llvmorg-18.1.4
# ef164cee 14-Apr-2024 Sirraide <aeternalmail@gmail.com>

[Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (#86526)

This implements support for the `= delete("message")` syntax that was
only just added to C++26
([P2573R2](https://is

[Clang] [C++26] Implement P2573R2: `= delete("should have a reason");` (#86526)

This implements support for the `= delete("message")` syntax that was
only just added to C++26
([P2573R2](https://isocpp.org/files/papers/P2573R2.html#proposal-scope)).

show more ...


# 2875e244 09-Apr-2024 Erich Keane <ekeane@nvidia.com>

Update __cpp_concepts macro (#87998)

After discussion with a few others, and seeing the state of our concepts
support, I believe it is worth trying to see if we can update this for
Clang19. The fo

Update __cpp_concepts macro (#87998)

After discussion with a few others, and seeing the state of our concepts
support, I believe it is worth trying to see if we can update this for
Clang19. The forcing function is that libstdc++'s `<expected>` header is
guarded by this macro, so we need to update it to support that.

show more ...


Revision tags: llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1
# 2acccf67 07-Mar-2024 aniplcc <157880614+aniplcc@users.noreply.github.com>

[Clang] Update value for __cpp_implicit_move (#84216) (#84228)

Fixes #84216


Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3
# 052ee74d 20-Feb-2024 Aaron Ballman <aaron@aaronballman.com>

[C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros (#82361)

This adds predefined formatting macros in C23 mode for printing unsigned
integers in binary format (e.g, UINT_FAST64_FMTB). Thes

[C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros (#82361)

This adds predefined formatting macros in C23 mode for printing unsigned
integers in binary format (e.g, UINT_FAST64_FMTB). These are used to
implement the PRIb (et al) macros in inttypes.h

Fixes https://github.com/llvm/llvm-project/issues/81896

(Was previously reviewed in
[82037](https://github.com/llvm/llvm-project/pull/82037), this is fixing
some failures found post-commit.)

show more ...


# bfbd0da0 16-Feb-2024 Aaron Ballman <aaron@aaronballman.com>

Revert "[C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros" (#82070)

Reverts llvm/llvm-project#82037

Breaks various buildbots:
http://45.33.8.238/linux/131051/step_7.txt
https://lab.ll

Revert "[C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros" (#82070)

Reverts llvm/llvm-project#82037

Breaks various buildbots:
http://45.33.8.238/linux/131051/step_7.txt
https://lab.llvm.org/buildbot/#/builders/231/builds/20751
others

show more ...


# b3050f51 16-Feb-2024 Aaron Ballman <aaron@aaronballman.com>

[C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros (#82037)

This adds predefined formatting macros in C23 mode for printing unsigned
integers in binary format (e.g, __UINT_FAST64_FMTB__).

[C23] Add __TYPE_FMTB__ and __TYPE_FMTb__ predefined macros (#82037)

This adds predefined formatting macros in C23 mode for printing unsigned
integers in binary format (e.g, __UINT_FAST64_FMTB__). These are used to
implement the PRIb (et al) macros in inttypes.h

Fixes https://github.com/llvm/llvm-project/issues/81896

show more ...


# ad49657a 14-Feb-2024 PiJoules <6019989+PiJoules@users.noreply.github.com>

[clang] Add fixed point precision macros (#81207)

This defines the builtin macros specified in `7.18a.3 Precision macros`
of ISO/IEC TR 18037:2008. These are the `__*__` versions of them and the
f

[clang] Add fixed point precision macros (#81207)

This defines the builtin macros specified in `7.18a.3 Precision macros`
of ISO/IEC TR 18037:2008. These are the `__*__` versions of them and the
formal definitions in stdfix.h can use them.

show more ...


Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1
# 0aff71c1 29-Jan-2024 yronglin <yronglin777@gmail.com>

[Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (#76361)

Implement P2718R0 "Lifetime extension in range-based for loops"
(https://wg21.link/P2718R0)

Differential Revision

[Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (#76361)

Implement P2718R0 "Lifetime extension in range-based for loops"
(https://wg21.link/P2718R0)

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

---------

Signed-off-by: yronglin <yronglin777@gmail.com>

show more ...


Revision tags: llvmorg-19-init
# 02a28ee8 22-Jan-2024 cor3ntin <corentinjabot@gmail.com>

[Clang] Update feature test macros for Clang 18 (#78991)

* Set `__cpp_auto_cast`, as per
https://github.com/cplusplus/CWG/issues/281
* Support `__has_extension(cxx_generalized_nttp)` in C++20 as the

[Clang] Update feature test macros for Clang 18 (#78991)

* Set `__cpp_auto_cast`, as per
https://github.com/cplusplus/CWG/issues/281
* Support `__has_extension(cxx_generalized_nttp)` in C++20 as the
feature isn't stable enough for a feature test macro
* Support `__has_extension(cxx_explicit_this_parameter)` in c++23 as the
feature isn't stable enough for a feature test macro

show more ...


# 4f21fb84 22-Jan-2024 Qiongsi Wu <274595+qiongsiwu@users.noreply.github.com>

[PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (#78285)

https://github.com/llvm/llvm-project/pull/76471 caused buildbot failures
on Windows. For more details, see
https://github.com

[PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (#78285)

https://github.com/llvm/llvm-project/pull/76471 caused buildbot failures
on Windows. For more details, see
https://github.com/llvm/llvm-project/issues/77546.

This PR revises the test and relands
https://github.com/llvm/llvm-project/pull/76471.

show more ...


# a828cda9 10-Jan-2024 Vitaly Buka <vitalybuka@google.com>

Revert "[PGO] Exposing PGO's Counter Reset and File Dumping APIs (#76471)"

Issue #77546

This reverts commit 07c9189fcc063bdf6219d2733843c89cde3991e1.


# 07c9189f 09-Jan-2024 Qiongsi Wu <274595+qiongsiwu@users.noreply.github.com>

[PGO] Exposing PGO's Counter Reset and File Dumping APIs (#76471)

This PR exposes four PGO functions

- `__llvm_profile_set_filename`
- `__llvm_profile_reset_counters`,
- `__llvm_profile_dump`

[PGO] Exposing PGO's Counter Reset and File Dumping APIs (#76471)

This PR exposes four PGO functions

- `__llvm_profile_set_filename`
- `__llvm_profile_reset_counters`,
- `__llvm_profile_dump`
- `__llvm_orderfile_dump`

to user programs through the new header `instr_prof_interface.h` under
`compiler-rt/include/profile`. This way, the user can include the header
`profile/instr_prof_interface.h` to introduce these four names to their
programs.

Additionally, this PR defines macro `__LLVM_INSTR_PROFILE_GENERATE` when
the program is compiled with profile generation, and defines macro
`__LLVM_INSTR_PROFILE_USE` when the program is compiled with profile
use. `__LLVM_INSTR_PROFILE_GENERATE` together with
`instr_prof_interface.h` define the PGO functions only when the program
is compiled with profile generation. When profile generation is off,
these PGO functions are defined away and leave no trace in the user's
program.

Background:
https://discourse.llvm.org/t/pgo-are-the-llvm-profile-functions-stable-c-apis-across-llvm-releases/75832

show more ...


# 6e1f1916 08-Dec-2023 Zixu Wang <9819235+zixu-w@users.noreply.github.com>

[clang][PP] Add extension to predefine target OS macros (#74676)

Add an extension feature `define-target-os-macros` that enables clang to
provide definitions of common TARGET_OS_* conditional macro

[clang][PP] Add extension to predefine target OS macros (#74676)

Add an extension feature `define-target-os-macros` that enables clang to
provide definitions of common TARGET_OS_* conditional macros. The
extension is enabled in the Darwin toolchain driver.

show more ...


# 4e80bc7d 07-Dec-2023 Joseph Huber <huberjn@outlook.com>

[Clang] Introduce scoped variants of GNU atomic functions (#72280)

Summary:
The standard GNU atomic operations are a very common way to target
hardware atomics on the device. With more heterogenous

[Clang] Introduce scoped variants of GNU atomic functions (#72280)

Summary:
The standard GNU atomic operations are a very common way to target
hardware atomics on the device. With more heterogenous devices being
introduced, the concept of memory scopes has been in the LLVM language
for awhile via the `syncscope` modifier. For targets, such as the GPU,
this can change code generation depending on whether or not we only need
to be consistent with the memory ordering with the entire system, the
single GPU device, or lower.

Previously these scopes were only exported via the `opencl` and `hip`
variants of these functions. However, this made it difficult to use
outside of those languages and the semantics were different from the
standard GNU versions. This patch introduces a `__scoped_atomic` variant
for the common functions. There was some discussion over whether or not
these should be overloads of the existing ones, or simply new variants.
I leant towards new variants to be less disruptive.

The scope here can be one of the following

```
__MEMORY_SCOPE_SYSTEM // All devices and systems
__MEMORY_SCOPE_DEVICE // Just this device
__MEMORY_SCOPE_WRKGRP // A 'work-group' AKA CUDA block
__MEMORY_SCOPE_WVFRNT // A 'wavefront' AKA CUDA warp
__MEMORY_SCOPE_SINGLE // A single thread.
```
Naming consistency was attempted, but it is difficult to capture to full
spectrum with no many names. Suggestions appreciated.

show more ...


Revision tags: llvmorg-17.0.6
# ff219ea9 17-Nov-2023 Erich Keane <ekeane@nvidia.com>

[OpenACC] Initial commits to support OpenACC (#70234)

Initial commits to support OpenACC. This patchset:

adds a clang-command line argument '-fopenacc', and starts
to define _OPENACC, albeit t

[OpenACC] Initial commits to support OpenACC (#70234)

Initial commits to support OpenACC. This patchset:

adds a clang-command line argument '-fopenacc', and starts
to define _OPENACC, albeit to '1' instead of the standardized
value (since we don't properly implement OpenACC yet).

The OpenACC spec defines `_OPENACC` to be equal to the latest standard
implemented. However, since we're not done implementing any standard,
we've defined this by default to be `1`. As it is useful to run our
compiler against existing OpenACC workloads, we're providing a
temporary override flag to change the `_OPENACC` value to be any
entirely digit value, permitting testing against any existing OpenACC
project.

Exactly like the OpenMP parser, the OpenACC pragma parser needs to
consume and reprocess the tokens. This patch sets up the infrastructure
to do so by refactoring the OpenMP version of this into a more general
version that works for OpenACC as well.

Additionally, this adds a few diagnostics and token kinds to get us
started.

show more ...


Revision tags: llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3
# 7d21086d 04-Oct-2023 Pranav Kant <prka@google.com>

Revert "[clang] Predefined macros for float128 support (#67196)"

This reverts commit 457f582ffe23e951380bc345c4c96ec053c09681.


# c0f8748d 03-Oct-2023 Alex Voicu <alexandru.voicu@amd.com>

[HIP][Clang][Preprocessor] Add Preprocessor support for `hipstdpar`

This patch adds the Driver changes needed for enabling HIP parallel algorithm offload on AMDGPU targets. This change merely adds t

[HIP][Clang][Preprocessor] Add Preprocessor support for `hipstdpar`

This patch adds the Driver changes needed for enabling HIP parallel algorithm offload on AMDGPU targets. This change merely adds two macros to inform user space if we are compiling in `hipstdpar` mode and, respectively, if the optional allocation interposition mode has been requested, as well as associated minimal tests. The macros can be used by the runtime implementation of offload to drive conditional compilation, and are only defined if the HIP language has been enabled.

Reviewed by: yaxunl

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

show more ...


Revision tags: llvmorg-17.0.2
# 457f582f 02-Oct-2023 Pranav Kant <prka@google.com>

[clang] Predefined macros for float128 support (#67196)

Expose some predefined macros for Float128 support.


Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3
# 0ce056a8 11-Aug-2023 Aaron Ballman <aaron@aaronballman.com>

[C23] Rename C2x -> C23; NFC

This does the rename for most internal uses of C2x, but does not rename
or reword diagnostics (those will be done in a follow-up).

I also updated standards references a

[C23] Rename C2x -> C23; NFC

This does the rename for most internal uses of C2x, but does not rename
or reword diagnostics (those will be done in a follow-up).

I also updated standards references and citations to the final wording
in the standard.

show more ...


# 13629b14 10-Aug-2023 Aaron Ballman <aaron@aaronballman.com>

[C2x] Support -std=c23 and -std=gnu23

C2x was finalized at the June 2023 WG14 meeting. The DIS is out for
balloting and the comment period for that closes later this year/early
next year. While that

[C2x] Support -std=c23 and -std=gnu23

C2x was finalized at the June 2023 WG14 meeting. The DIS is out for
balloting and the comment period for that closes later this year/early
next year. While that does leave an opportunity for more changes to the
standard during the DIS ballot resolution process, only editorial
changes are anticipated and as a result, the C committee considers C2x
to be final. The committee took a straw poll on what we'd prefer the
informal name of the standard be, and we decided it should be called
C23 regardless of what year ISO publishes it.

However, because the final publication is not out, this patch does not
add the language standard alias for the -std=iso9899:<year> spelling of
the standard mode; that will be added once ISO finally publishes the
document and the year chosen will match the publication date.

This also changes the value of __STDC_VERSION__ from the placeholder
value 202000L to the final value 202311L.

Subsequent patches will start renaming things from c2x to c23, cleaning
up documentation, etc.

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

show more ...


Revision tags: llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# a8bef886 22-Jun-2023 Corentin Jabot <corentinjabot@gmail.com>

[Clang] Implement P2169 A nice placeholder with no name

This is a C++ feature that allows the use of `_` to
declare multiple variable of that name in the same scope;
these variables can then not be

[Clang] Implement P2169 A nice placeholder with no name

This is a C++ feature that allows the use of `_` to
declare multiple variable of that name in the same scope;
these variables can then not be referred to.

In addition, while P2169 does not extend to parameter
declarations, we stop warning on unused parameters of that name,
for consistency.

The feature is backported to all C++ language modes.

Reviewed By: #clang-language-wg, aaron.ballman

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

show more ...


# e1788243 09-Jul-2023 Yaxun (Sam) Liu <yaxun.liu@amd.com>

[CUDA][HIP] Rename and fix `-fcuda-approx-transcendentals`

Rename -fcuda-approx-transcendentals as
-fgpu-approx-transcendentals and pass it
to both device and host clang -cc1.

Fix its interaction w

[CUDA][HIP] Rename and fix `-fcuda-approx-transcendentals`

Rename -fcuda-approx-transcendentals as
-fgpu-approx-transcendentals and pass it
to both device and host clang -cc1.

Fix its interaction with -ffast-math to allow
-fno-gpu-approx-transcendentals to override
the implicit -fcuda-approx-transcendentals
due to -ffast-math.

Rename the predefined macro to be
__CLANG_GPU_APPROX_TRANSCENDENTALS__.
Emit the macro for both device and host compilation.

Reviewed by: Artem Belevich, Fangrui Song

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

show more ...


Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4
# 47ccfd7a 01-Nov-2022 Corentin Jabot <corentinjabot@gmail.com>

[Clang] Implement P2741R3 - user-generated static_assert messages

Reviewed By: #clang-language-wg, aaron.ballman

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


12345678910>>...20