1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/unittests
JF Bastien f4f5b32f44 NFC: make AtomicOrdering an enum class
Summary:
In the context of http://wg21.link/lwg2445 C++ uses the concept of
'stronger' ordering but doesn't define it properly. This should be fixed
in C++17 barring a small question that's still open.

The code currently plays fast and loose with the AtomicOrdering
enum. Using an enum class is one step towards tightening things. I later
also want to tighten related enums, such as clang's
AtomicOrderingKind (which should be shared with LLVM as a 'C++ ABI'
enum).

This change touches a few lines of code which can be improved later, I'd
like to keep it as NFC for now as it's already quite complex. I have
related changes for clang.

As a follow-up I'll add:
  bool operator<(AtomicOrdering, AtomicOrdering) = delete;
  bool operator>(AtomicOrdering, AtomicOrdering) = delete;
  bool operator<=(AtomicOrdering, AtomicOrdering) = delete;
  bool operator>=(AtomicOrdering, AtomicOrdering) = delete;
This is separate so that clang and LLVM changes don't need to be in sync.

Reviewers: jyknight, reames

Subscribers: jyknight, llvm-commits

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

llvm-svn: 265602
2016-04-06 21:19:33 +00:00
..
ADT Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes." 2016-04-05 20:45:04 +00:00
Analysis NFC: make AtomicOrdering an enum class 2016-04-06 21:19:33 +00:00
AsmParser [AsmParser] Expose an API to parse a string starting with a type. 2016-03-08 00:37:07 +00:00
Bitcode Explicitly test BitstreamReader::setArtificialByteLimit, NFC 2016-03-28 20:39:41 +00:00
CodeGen
DebugInfo
ExecutionEngine Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes." 2016-04-05 20:45:04 +00:00
IR IRMover: Steal arguments when moving functions, NFC 2016-04-06 06:38:15 +00:00
LineEditor
Linker
MC Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
MI
ObjectYAML Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00
Option
ProfileData [PGO] Use ArrayRef in annotateValueSite() 2016-03-30 16:56:31 +00:00
Support Revert "Fix Clang-tidy modernize-deprecated-headers warnings in remaining files; other minor fixes." 2016-04-05 20:45:04 +00:00
Transforms ValueMapper: Rewrite Mapper::mapMetadata without recursion 2016-04-05 20:23:21 +00:00
CMakeLists.txt Move ObjectYAML code to a new library. 2016-03-01 19:15:06 +00:00