llvm-project/clang/lib/Frontend
Michal Gorny dc155744c8 [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin
Correct the logic used to set ATOMIC_*_LOCK_FREE preprocessor macros not
to rely on the ABI alignment of types. Instead, just assume all those
types are aligned correctly by default since clang uses safe alignment
for _Atomic types even if the underlying types are aligned to a lower
boundary by default.

For example, the 'long long' and 'double' types on x86 are aligned to
32-bit boundary by default. However, '_Atomic long long' and '_Atomic
double' are aligned to 64-bit boundary, therefore satisfying
the requirements of lock-free atomic operations.

This fixes PR #19355 by correcting the value of
__GCC_ATOMIC_LLONG_LOCK_FREE on x86, and therefore also fixing
the assumption made in libc++ tests. This also fixes PR #30581 by
applying a consistent logic between the functions used to implement
both interfaces.

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

llvm-svn: 291477
2017-01-09 20:54:20 +00:00
..
Rewrite getObjCEncodingForMethodDecl cannot fail. Simplify. NFC. 2016-11-29 21:57:00 +00:00
ASTConsumers.cpp Handle StaticAssertDecl in DeclContextPrinter 2017-01-03 12:16:02 +00:00
ASTMerge.cpp [Frontend] Make the memory management of FrontendAction pointers explicit by using unique_ptr. 2016-02-07 19:28:36 +00:00
ASTUnit.cpp Reapply "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and CodeCompleteConsumer" 2017-01-06 19:49:01 +00:00
CMakeLists.txt clangFrontend: Make intrinsics_gen optional for standalone build. 2016-06-02 20:24:07 +00:00
CacheTokens.cpp Fix the build with MSVC 2013 after r283856 2016-10-11 17:24:09 +00:00
ChainedDiagnosticConsumer.cpp
ChainedIncludesSource.cpp Reapply "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and CodeCompleteConsumer" 2017-01-06 19:49:01 +00:00
CodeGenOptions.cpp revert SVN r265702, r265640 2016-04-08 16:52:00 +00:00
CompilerInstance.cpp Reapply "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and CodeCompleteConsumer" 2017-01-06 19:49:01 +00:00
CompilerInvocation.cpp Add a cc1 option to force disabling lifetime-markers emission from clang 2017-01-06 23:18:09 +00:00
CreateInvocationFromCommandLine.cpp Reapply "IntrusiveRefCntPtr -> std::shared_ptr for CompilerInvocationBase and CodeCompleteConsumer" 2017-01-06 19:49:01 +00:00
DependencyFile.cpp Rangify for loops, NFC. 2016-11-16 19:24:10 +00:00
DependencyGraph.cpp Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
DiagnosticRenderer.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
FrontendAction.cpp Move Preprocessor over to std::shared_ptr rather than IntrusiveRefCntPtr 2017-01-05 19:48:07 +00:00
FrontendActions.cpp PCH: fix a regression that reports a module is defined in both pch and pcm. 2017-01-09 19:20:18 +00:00
FrontendOptions.cpp C++ Modules TS: add frontend support for building pcm files from module 2016-08-26 00:14:38 +00:00
HeaderIncludeGen.cpp [Frontend] StringRefize and fix bad indentation. 2016-05-27 12:52:19 +00:00
InitHeaderSearch.cpp [Frontend] Fix an issue where a quoted search path is incorrectly 2016-12-02 09:51:51 +00:00
InitPreprocessor.cpp [Frontend] Correct values of ATOMIC_*_LOCK_FREE to match builtin 2017-01-09 20:54:20 +00:00
LangStandards.cpp
LayoutOverrideSource.cpp Annotate dump() methods with LLVM_DUMP_METHOD, addressing Richard Smith r259192 post commit comment. 2016-01-29 19:38:18 +00:00
LogDiagnosticPrinter.cpp Replace double negation of !FileID.isInvalid() with FileID.isValid(). 2015-10-03 10:46:20 +00:00
ModuleDependencyCollector.cpp [CrashReproducer] Add support for merging -ivfsoverlay 2016-12-22 07:06:03 +00:00
MultiplexConsumer.cpp PR29097: add an update record when we instantiate the default member 2016-08-24 21:25:37 +00:00
PCHContainerOperations.cpp Bitcode: Decouple block info block state from reader. 2016-11-08 04:17:11 +00:00
PrintPreprocessedOutput.cpp [Preprocessor] Support for '-dI' flag 2016-11-17 22:45:31 +00:00
SerializedDiagnosticPrinter.cpp Move SerializedDiagnosticPrinter's SharedState to std::shared_ptr rather than IntrusiveRefCntPtr 2017-01-05 19:48:10 +00:00
SerializedDiagnosticReader.cpp Bitcode: Decouple block info block state from reader. 2016-11-08 04:17:11 +00:00
TestModuleFileExtension.cpp Fix for LLVM Bitcode API change (to use std::shared_ptr) 2017-01-04 22:36:43 +00:00
TestModuleFileExtension.h Module file extensions: pass a Sema through to the extension writer. 2015-12-08 22:43:32 +00:00
TextDiagnostic.cpp Move UTF functions into namespace llvm. 2016-09-30 00:38:45 +00:00
TextDiagnosticBuffer.cpp Replace push_back(Constructor(foo)) with emplace_back(foo) for non-trivial types 2015-05-29 19:42:19 +00:00
TextDiagnosticPrinter.cpp [NFC] Header cleanup 2016-07-18 19:02:11 +00:00
VerifyDiagnosticConsumer.cpp Instead of resetting the pointer, or releasing it which was the previous 2016-11-03 18:03:14 +00:00