1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-26 14:33:02 +02:00
llvm-mirror/lib/Transforms/Instrumentation
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
..
AddressSanitizer.cpp Silencing warnings from MSVC 2015 Update 2. All of these changes silence "C4334 '<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)". NFC. 2016-03-30 21:30:00 +00:00
BoundsChecking.cpp Remove PreserveNames template parameter from IRBuilder 2016-03-13 21:05:13 +00:00
CFGMST.h [PGO] Resubmit "MST based PGO instrumentation infrastructure" (r254021) 2015-12-09 18:08:16 +00:00
CMakeLists.txt Move SafeStack to CodeGen. 2016-01-27 16:53:42 +00:00
DataFlowSanitizer.cpp [DFSan] Remove an overly aggressive assert reported in PR26068. 2016-03-07 14:05:09 +00:00
GCOVProfiling.cpp [GCOV] Avoid emitting profile arcs for module and skeleton CUs 2016-01-21 17:04:42 +00:00
IndirectCallSiteVisitor.h [PGO] Avoid instrumenting direct callee's at value sites. 2016-04-04 18:56:36 +00:00
InstrProfiling.cpp [PGO] Remove redundant counter copies for avail_extern functions. 2016-02-27 23:11:30 +00:00
Instrumentation.cpp Move SafeStack to CodeGen. 2016-01-27 16:53:42 +00:00
LLVMBuild.txt [PGO] Resubmit "MST based PGO instrumentation infrastructure" (r254021) 2015-12-09 18:08:16 +00:00
MaximumSpanningTree.h
MemorySanitizer.cpp NFC: make AtomicOrdering an enum class 2016-04-06 21:19:33 +00:00
PGOInstrumentation.cpp [PGO] Use a helper function to find all indirect call-sites 2016-04-01 23:16:44 +00:00
SanitizerCoverage.cpp NFC: make AtomicOrdering an enum class 2016-04-06 21:19:33 +00:00
ThreadSanitizer.cpp NFC: make AtomicOrdering an enum class 2016-04-06 21:19:33 +00:00