diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2016-07-19 21:35:47 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2016-07-19 21:35:47 +0000 |
commit | 22a0f1a0b96a1388bd92bbb3ea67bdcee101669e (patch) | |
tree | 01c3886cbc5a66dc8443b1486975510832c04f55 /llvm/lib | |
parent | 1abc356e3e5f4698a383c4998609c608a0f60420 (diff) | |
download | bcm5719-llvm-22a0f1a0b96a1388bd92bbb3ea67bdcee101669e.tar.gz bcm5719-llvm-22a0f1a0b96a1388bd92bbb3ea67bdcee101669e.zip |
Attempt to appease MSVC buildbots.
Broken by r276026.
llvm-svn: 276032
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Analysis/CFLAndersAliasAnalysis.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/CFLAndersAliasAnalysis.cpp b/llvm/lib/Analysis/CFLAndersAliasAnalysis.cpp index 3925b9c6451..8a85679759b 100644 --- a/llvm/lib/Analysis/CFLAndersAliasAnalysis.cpp +++ b/llvm/lib/Analysis/CFLAndersAliasAnalysis.cpp @@ -107,12 +107,14 @@ enum class MatchState : uint8_t { }; typedef std::bitset<7> StateSet; -LLVM_CONSTEXPR StateSet ReadOnlyStateMask = - (1 << static_cast<uint8_t>(MatchState::FlowFromReadOnly)) | - (1 << static_cast<uint8_t>(MatchState::FlowFromMemAliasReadOnly)); -LLVM_CONSTEXPR StateSet WriteOnlyStateMask = - (1 << static_cast<uint8_t>(MatchState::FlowToWriteOnly)) | - (1 << static_cast<uint8_t>(MatchState::FlowToMemAliasWriteOnly)); +// N.B. These are unsigned instead of StateSets because some MSVC versions +// apparently lack constexpr bitset ctors. +LLVM_CONSTEXPR unsigned ReadOnlyStateMask = + (1U << static_cast<uint8_t>(MatchState::FlowFromReadOnly)) | + (1U << static_cast<uint8_t>(MatchState::FlowFromMemAliasReadOnly)); +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 // the paper) during the analysis. @@ -249,11 +251,11 @@ public: }; static bool hasReadOnlyState(StateSet Set) { - return (Set & ReadOnlyStateMask).any(); + return (Set & StateSet(ReadOnlyStateMask)).any(); } static bool hasWriteOnlyState(StateSet Set) { - return (Set & WriteOnlyStateMask).any(); + return (Set & StateSet(WriteOnlyStateMask)).any(); } static Optional<InterfaceValue> |