| 1039 | } |
| 1040 | |
| 1041 | static AtomicOrdering getDecodedOrdering(unsigned Val) { |
| 1042 | switch (Val) { |
| 1043 | case bitc::ORDERING_NOTATOMIC: return AtomicOrdering::NotAtomic; |
| 1044 | case bitc::ORDERING_UNORDERED: return AtomicOrdering::Unordered; |
| 1045 | case bitc::ORDERING_MONOTONIC: return AtomicOrdering::Monotonic; |
| 1046 | case bitc::ORDERING_ACQUIRE: return AtomicOrdering::Acquire; |
| 1047 | case bitc::ORDERING_RELEASE: return AtomicOrdering::Release; |
| 1048 | case bitc::ORDERING_ACQREL: return AtomicOrdering::AcquireRelease; |
| 1049 | default: // Map unknown orderings to sequentially-consistent. |
| 1050 | case bitc::ORDERING_SEQCST: return AtomicOrdering::SequentiallyConsistent; |
| 1051 | } |
| 1052 | } |
| 1053 | |
| 1054 | static Comdat::SelectionKind getDecodedComdatSelectionKind(unsigned Val) { |
| 1055 | switch (Val) { |