1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00

Attempt to appease MSVC buildbots.

Broken by r276026.

llvm-svn: 276032
This commit is contained in:
George Burgess IV 2016-07-19 21:35:47 +00:00
parent 8a49ae441b
commit 9f13bab8bf

View File

@ -107,12 +107,14 @@ enum class MatchState : uint8_t {
}; };
typedef std::bitset<7> StateSet; typedef std::bitset<7> StateSet;
LLVM_CONSTEXPR StateSet ReadOnlyStateMask = // N.B. These are unsigned instead of StateSets because some MSVC versions
(1 << static_cast<uint8_t>(MatchState::FlowFromReadOnly)) | // apparently lack constexpr bitset ctors.
(1 << static_cast<uint8_t>(MatchState::FlowFromMemAliasReadOnly)); LLVM_CONSTEXPR unsigned ReadOnlyStateMask =
LLVM_CONSTEXPR StateSet WriteOnlyStateMask = (1U << static_cast<uint8_t>(MatchState::FlowFromReadOnly)) |
(1 << static_cast<uint8_t>(MatchState::FlowToWriteOnly)) | (1U << static_cast<uint8_t>(MatchState::FlowFromMemAliasReadOnly));
(1 << static_cast<uint8_t>(MatchState::FlowToMemAliasWriteOnly)); LLVM_CONSTEXPR unsigned WriteOnlyStateMask =
(1U << static_cast<uint8_t>(MatchState::FlowToWriteOnly)) |
(1U << static_cast<uint8_t>(MatchState::FlowToMemAliasWriteOnly));
// We use ReachabilitySet to keep track of value aliases (The nonterminal "V" in // We use ReachabilitySet to keep track of value aliases (The nonterminal "V" in
// the paper) during the analysis. // the paper) during the analysis.
@ -249,11 +251,11 @@ public:
}; };
static bool hasReadOnlyState(StateSet Set) { static bool hasReadOnlyState(StateSet Set) {
return (Set & ReadOnlyStateMask).any(); return (Set & StateSet(ReadOnlyStateMask)).any();
} }
static bool hasWriteOnlyState(StateSet Set) { static bool hasWriteOnlyState(StateSet Set) {
return (Set & WriteOnlyStateMask).any(); return (Set & StateSet(WriteOnlyStateMask)).any();
} }
static Optional<InterfaceValue> static Optional<InterfaceValue>